def get_contact_objects(current_user, contact):

    objects = dict(CONTACT_OBJECTS)

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

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