gets a single products metadata

def get_product_metadata_path(product_name):
    """ gets a single products metadata """

    string_date = product_name.split('_')[-1]
    date = datetime.datetime.strptime(string_date, '%Y%m%dT%H%M%S')
    path = 'products/{0}/{1}/{2}/{3}'.format(date.year, date.month, date.day, product_name)

    return {
        product_name: {
            'metadata': '{0}/{1}'.format(path, 'metadata.xml'),
            'tiles': get_tile_metadata_path('{0}/{1}'.format(path, 'productInfo.json'))
        }
    }