def get_parent(brain_or_object):
if is_root(brain_or_object):<EOL><INDENT>return get_portal()<EOL><DEDENT>if is_brain(brain_or_object):<EOL><INDENT>parent_path = get_parent_path(brain_or_object)<EOL>return get_object_by_path(parent_path)<EOL><DEDENT>return brain_or_object.aq_parent<EOL>
Locate the parent object of the content/catalog brain

    :param brain_or_object: A single catalog brain or content object
    :type brain_or_object: ATContentType/DexterityContentType/CatalogBrain
    :returns: parent object
    :rtype: Parent content