def get_all_handlers(self) -> T.Dict[str, T.List[T.Callable]]:
        """Returns a dict with event names as keys and lists of
        registered handlers as values."""

        events = {}
        for event, handlers in self._events.items():
            events[event] = list(handlers)
        return events
def get_all_handlers ( self ) -> T . Dict [ str , T . List [ T . Callable ] ] : events = { } for event , handlers in self . _events . items ( ) : events [ event ] = list ( handlers ) return events
Returns a dict with event names as keys and lists of
        registered handlers as values.