class_docstr: A repository mapping names -> publishers
  
  As a usability optimization, using this Repository will eagerly load and register all
  publishers in the application.
class_docstr_tok: ["A","repository","mapping","names","-",">","publishers","As","a","usability","optimization",",","using","this","Repository","will","eagerly","load","and","register","all","publishers","in","the","application","."]
docstr: Returns TRUE if the given reference can be registered as a publisher
  
  Publishers are valid if and only if they fall into one of the following categories:
  
  * They are a python function that accepts 2 arguments: (alert: Alert, publication: dict)
  * They are a python class that extends AlertPublisher
  
  Args:
      thing (mixed): Any primitive or reference to be checked
  
  Returns:
      bool
docstr_tok: ["Returns","TRUE","if","the","given","reference","can","be","registered","as","a","publisher","Publishers","are","valid","if","and","only","if","they","fall","into","one","of","the","following","categories",":","*","They","are","a","python","function","that","accepts","2","arguments",":","(","alert",":","Alert",",","publication",":","dict",")","*","They","are","a","python","class","that","extends","AlertPublisher","Args",":","thing","(","mixed",")",":","Any","primitive","or","reference","to","be","checked","Returns",":","bool"]
code: def is_valid_publisher(thing):
      """Returns TRUE if the given reference can be registered as a publisher
  
      Publishers are valid if and only if they fall into one of the following categories:
  
      * They are a python function that accepts 2 arguments: (alert: Alert, publication: dict)
      * They are a python class that extends AlertPublisher
  
      Args:
          thing (mixed): Any primitive or reference to be checked
  
      Returns:
          bool
      """
  
      # We have to put the isclass() check BEFORE the callable() check because classes are also
      # callable!
      return (
          issubclass(thing, AlertPublisher)
          if isclass(thing)
          else callable(thing)
      )
  
imports: from abc import abstractmethod
  from copy import deepcopy
  from inspect import isclass
  from streamalert.shared.config import load_config
  from streamalert.shared.importer import import_folders
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 2 for calling the AlertPublisherRepository obj's underlying member method code with example usage: obj.is_valid_publisher(thing) and returns: unknown