code: def from_main(cls, signature=''):
          
          instance = cls()
  
          def decorate(function):
              instance.main(signature)(function)
              return instance
          return decorate
docs: A decorator that creates an instance and registers the decorated
          function as main function, see :meth:`main` for more information.
  
          .. versionadded:: 0.2