<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on( # pylint: disable=invalid-name self, event: str, *handlers: T.Callable ) -> T.Callable: """Registers one or more handlers to a specified event. This method may as well be used as a decorator for the handler."""


        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