def price_table_to_price_mapping(table):
    """Convert price table to a dict mapping from region to instance type
    to instance info

    """
    region_price_mapping = {}
    for region_table in table['config']['regions']:
        types = {}
        for type_category in region_table['instanceTypes']:
            for size in type_category['sizes']:
                types[size['size']] = size
        region_price_mapping[region_table['region']] = types
    return region_price_mapping