parameters: (obj)
docstring: return the handler for the object type
docstring_summary: return the handler for the object type
docstring_tokens: return the handler for the object type
function: def handler_for(obj):
      """return the handler for the object type"""
      for handler_type in handlers:
          if isinstance(obj, handler_type):
              return handlers[handler_type]
  
      try:
          for handler_type in handlers:
              if issubclass(obj, handler_type):
                  return handlers[handler_type]
      except TypeError:
          # if obj isn't a class, issubclass will raise a TypeError
          pass
function_tokens: def handler_for ( obj ) : for handler_type in handlers : if isinstance ( obj , handler_type ) : return handlers [ handler_type ] try : for handler_type in handlers : if issubclass ( obj , handler_type ) : return handlers [ handler_type ] except TypeError : # if obj isn't a class, issubclass will raise a TypeError pass