code: def get_portal_type(brain_or_object):
      
      if not is_object(brain_or_object):
          fail("{} is not supported.".format(repr(brain_or_object)))
      return brain_or_object.portal_type
docs: Get the portal type for this object
  
      :param brain_or_object: A single catalog brain or content object
      :type brain_or_object: ATContentType/DexterityContentType/CatalogBrain
      :returns: Portal type
      :rtype: string