def get_parent_info(brain_or_object, endpoint=None):
<EOL>if is_root(brain_or_object):<EOL><INDENT>return {}<EOL><DEDENT>parent = get_parent(brain_or_object)<EOL>portal_type = get_portal_type(parent)<EOL>resource = portal_type_to_resource(portal_type)<EOL>if endpoint is None:<EOL><INDENT>endpoint = get_endpoint(parent)<EOL><DEDENT>return {<EOL>"<STR_LIT>": get_id(parent),<EOL>"<STR_LIT>": get_uid(parent),<EOL>"<STR_LIT>": url_for(endpoint, resource=resource, uid=get_uid(parent))<EOL>}<EOL>
Generate url information for the parent object

    :param brain_or_object: A single catalog brain or content object
    :type brain_or_object: ATContentType/DexterityContentType/CatalogBrain
    :param endpoint: The named URL endpoint for the root of the items
    :type endpoint: str/unicode
    :returns: URL information mapping
    :rtype: dict