def METHOD_NAME(self, instance):
    # Query all assets for project and store them by parent's id to list
    project_name = instance.context.data["projectEntity"]["name"]
    asset_docs_by_parent_id = collections.defaultdict(list)
    for asset_doc in get_assets(project_name):
        parent_id = asset_doc["data"]["visualParent"]
        asset_docs_by_parent_id[parent_id].append(asset_doc)
    return asset_docs_by_parent_id