def fn():
    filters = []
    if config.source.lastUpdated:
        filters.append(f'lastUpdated:ge:{config.source.lastUpdated}')
    option_sets_filter = list(map((lambda x: f'id:eq:{x}'), config.source.filters.optionSets))
    option_sets_filter.extend(filters)
    option_sets = BaseHttpRequest(host).get('api/optionSets', params={'fields': 'id,code,name,version,translations,options[id,code,name,translations]', 'rootJunction': 'OR', 'filter': option_sets_filter, 'paging': False})
    categories_filter = list(map((lambda x: f'id:eq:{x}'), config.source.filters.categories))
    categories_filter.extend(filters)
    categories = BaseHttpRequest(host).get('api/categories', params={'fields': 'id,code,name,translations,categoryOptions::rename(options)[id,code,name,translations]', 'rootJunction': 'OR', 'filter': categories_filter, 'paging': False})
    data = {'optionSets': option_sets.get('optionSets', []), 'categories': categories.get('categories', [])}
    return (host, data)
def fn():
    filters = []
    if config.source.lastUpdated:
        filters.append(f'lastUpdated:ge:{config.source.lastUpdated}')
    option_sets_filter = list(map((lambda x: f'id:eq:{x}'), config.source.filters.optionSets))
    option_sets_filter.extend(filters)
    option_sets = BaseHttpRequest(host).get('api/optionSets', params={'fields': 'id,code,name,version,translations,options[id,code,name,translations]', 'rootJunction': 'OR', 'filter': option_sets_filter, 'paging': False})
    categories_filter = list(map((lambda x: f'id:eq:{x}'), config.source.filters.categories))
    categories_filter.extend(filters)
    categories = BaseHttpRequest(host).get('api/categories', params={'fields': 'id,code,name,translations,categoryOptions::rename(options)[id,code,name,translations]', 'rootJunction': 'OR', 'filter': categories_filter, 'paging': False})
    data = {'optionSets': option_sets.get('optionSets', []), 'categories': categories.get('categories', [])}
    return (host, data)