code: def get_catalogs_for(brain_or_object, default="portal_catalog"):
      
      archetype_tool = get_tool("archetype_tool", None)
      if not archetype_tool:
          # return the default catalog
          return [get_tool(default)]
  
      catalogs = []
  
      # get the registered catalogs for portal_type
      if is_object(brain_or_object):
          catalogs = archetype_tool.getCatalogsByType(
              get_portal_type(brain_or_object))
      if isinstance(brain_or_object, basestring):
          catalogs = archetype_tool.getCatalogsByType(brain_or_object)
  
      if not catalogs:
          return [get_tool(default)]
      return catalogs
docs: Get all registered catalogs for the given portal_type, catalog brain or
      content object
  
      :param brain_or_object: The portal_type, a catalog brain or content object
      :type brain_or_object: ATContentType/DexterityContentType/CatalogBrain
      :returns: List of supported catalogs
      :rtype: list