docs: def setHandler(self, event_name, callback):
          """Set an handler for given event."""
          if event_name not in self.handlers:
              raise ValueError('{} is not a valid event'.format(event_name))
          if callable(event_name):
              raise TypeError('{} is not callable'.format(callback))
          self.handlers[event_name] = callback