def event_handler(*events):
    """Decorator to mark a class method as an event handler.

    When the decorator is applied, you must pass the Event classes the method
    will listen for to the decorator, e.g.
      @event_handler(EventOne, EventTwo)
      def handler_method(self, event):
          pass
    An instance of this class can then be passed to the register() function,
    which will identify and register the decorated method(s) for the listed
    events.
    """
    def decorator(meth):
        meth.handled_events = events
        return meth
    return decorator