code: def get_path(brain_or_object):
      
      if is_brain(brain_or_object):
          path = brain_or_object.getPath()
          portal_path = get_path(get_portal())
          if portal_path not in path:
              return "{}/{}".format(portal_path, path)
          return path
      return "/".join(get_object(brain_or_object).getPhysicalPath())
docs: Calculate the physical path of this object
  
      :param brain_or_object: A single catalog brain or content object
      :type brain_or_object: ATContentType/DexterityContentType/CatalogBrain
      :returns: Physical path of the object
      :rtype: string