@staticmethod
def extract_dimensions(instance_usage_dict, dimension_list):
    """Extract dimensions from instance usage.

        """
    dimensions_part = {}
    extra_data_map = instance_usage_dict.get('extra_data_map', {})
    for dim in dimension_list:
        value = instance_usage_dict.get(dim)
        if value is None:
            if len(list(extra_data_map)) > 0:
                value = extra_data_map.get(dim, 'all')
        if dim.startswith('dimensions#'):
            dim = dim.replace('dimensions#', '')
        elif dim.startswith('meta#'):
            dim = dim.replace('meta#', '')
        elif dim.startswith('value_meta#'):
            dim = dim.replace('value_meta#', '')
        dimensions_part[dim] = value
    return dimensions_part
