def is_registered(self, event: str, handler: T.Callable) -> bool:
        """Returns whether the given handler is registered for the
        given event."""

        return handler in self._events.get(event, [])
def is_registered ( self , event : str , handler : T . Callable ) -> bool : return handler in self . _events . get ( event , [ ] )
Returns whether the given handler is registered for the
        given event.