code: def get_contents(brain_or_object):
      
  
      # Nothing to do if the object is contentish
      if not is_folderish(brain_or_object):
          return []
  
      # Returning objects (not brains) to make sure we do not miss any child.
      # It may happen when children belong to different catalogs and not
      # found on 'portal_catalog'.
      ret = filter(lambda obj: api.is_object(obj),
                   api.get_object(brain_or_object).objectValues())
      return ret
docs: Lookup folder contents for this object.
  
      :param brain_or_object: A single catalog brain or content object
      :type brain_or_object: ATContentType/DexterityContentType/CatalogBrain
      :returns: List of contained contents
      :rtype: list/Products.ZCatalog.Lazy.LazyMap