code: def on(  # pylint: disable=invalid-name
              self, event: str, *handlers: T.Callable
      ) -> T.Callable:
          
  
          def _on_wrapper(*handlers: T.Callable) -> T.Callable:
              """wrapper for on decorator"""
              self._events[event].extend(handlers)
              return handlers[0]
  
          if handlers:
              return _on_wrapper(*handlers)
          return _on_wrapper
docs: Registers one or more handlers to a specified event.
          This method may as well be used as a decorator for the handler.