def _get_metadata_media_pool_item(media_pool_item):
    data = dict()
    data.update({k: v for (k, v) in media_pool_item.GetMetadata().items()})
    property = (media_pool_item.GetClipProperty() or {})
    for (name, value) in property.items():
        if (('Resolution' in name) and ('' != value)):
            (width, height) = value.split('x')
            data.update({'width': int(width), 'height': int(height)})
        if (('PAR' in name) and ('' != value)):
            try:
                data.update({'pixelAspect': float(value)})
            except ValueError:
                if ('Square' in value):
                    data.update({'pixelAspect': float(1)})
                else:
                    data.update({'pixelAspect': float(1)})
    return data
def _get_metadata_media_pool_item(media_pool_item):
    data = dict()
    data.update({k: v for (k, v) in media_pool_item.GetMetadata().items()})
    property = (media_pool_item.GetClipProperty() or {})
    for (name, value) in property.items():
        if (('Resolution' in name) and ( != value)):
            (width, height) = value.split('x')
            data.update({'width': int(width), 'height': int(height)})
        if (('PAR' in name) and ( != value)):
            try:
                data.update({'pixelAspect': float(value)})
            except ValueError:
                if ('Square' in value):
                    data.update({'pixelAspect': float(1)})
                else:
                    data.update({'pixelAspect': float(1)})
    return data