code: def handler_for_name(fq_name):
    
    resolved_name = for_name(fq_name)
    if isinstance(resolved_name, (type, types.ClassType)):
      # create new instance if this is type
      return resolved_name()
    elif isinstance(resolved_name, types.MethodType):
      # bind the method
      return getattr(resolved_name.im_class(), resolved_name.__name__)
    else:
      return resolved_name
docs: Resolves and instantiates handler by fully qualified name.
  
    First resolves the name using for_name call. Then if it resolves to a class,
    instantiates a class, if it resolves to a method - instantiates the class and
    binds method to the instance.
  
    Args:
      fq_name: fully qualified name of something to find.
  
    Returns:
      handler instance which is ready to be called.