def convert_entity_aggregations(result, output, args):
    aggs = result.get('aggregations', {})
    scoped = aggs.get('scoped', {})
    collections = scoped.get('collection', {}).get('collection', {})
    output['collections'] = convert_collections(collections)
    return convert_facets(result, output, args)
Traverse and get all facets.
dataset/ETHPy150Open pudo/aleph/aleph/search/facets.py/convert_entity_aggregations