def get_user_objects(current_user, user):

    objects = dict(USER_OBJECTS)

    for key in objects:
        if hasattr(user, key):
            objects[key]['objects'] = Object.filter_permitted(
                current_user, getattr(user, key))

    return objects
Returns a dictionary with keys specified as contact attributes
dataset/ETHPy150Open treeio/treeio/treeio/sales/identities.py/get_user_objects