@abstractmethod<EOL><INDENT>def register_handler(self, event, handler):<DEDENT>
pass<EOL>
Register a handler for an event.

:param event: The event to be handled. This can be any object, as long as it's hashable.
:param handler: A callback function to be called when the event is triggered. The arguments are dependent
                on the event.
:return: A handle that can be passed to :meth:`unregister_handler` to remove the registration.