code: def get_parent_info(brain_or_object, endpoint=None):
      
  
      # special case for the portal object
      if is_root(brain_or_object):
          return {}
  
      # get the parent object
      parent = get_parent(brain_or_object)
      portal_type = get_portal_type(parent)
      resource = portal_type_to_resource(portal_type)
  
      # fall back if no endpoint specified
      if endpoint is None:
          endpoint = get_endpoint(parent)
  
      return {
          "parent_id": get_id(parent),
          "parent_uid": get_uid(parent),
          "parent_url": url_for(endpoint, resource=resource, uid=get_uid(parent))
      }
docs: 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