@run_if('GOOGLE_APPS')
def create_media_folder_with_images(parent_id, image_links, folder_name):
    service = Service(settings.GOOGLE_P12_PATH,
                      settings.GOOGLE_SERVICE_EMAIL)
    folder = create_folder_with_permissions(parent_id,
                                            folder_name,
                                            [read_with_link_permission])
    folder_id = folder['id']
    counter = Counter()
    for image_link in image_links:
        try:
            image = add_image(service, folder_id, image_link)
            counter['uploaded_images'] += 1
            logger.info('Image has been uploaded %s', image)
        except (InvalidUrlError, FailedRequest):
            counter['not_uploaded_images'] += 1
            logger.exception('Failed to retrieve image from %s',
                             image_link)
    return {'folder': folder,
            'image_counter': counter}
Create a query string from a list or dictionary
dataset/ETHPy150Open unlimitedlabs/orchestra/orchestra/google_apps/convenience.py/create_media_folder_with_images--crossover with--dataset/ETHPy150Open gocardless/gocardless-python/gocardless/utils.py/to_query