code: def register_listener(self, name, listener, priority=5):
          
          self._event_types[name].listeners[priority].append(listener)
docs: Registers a new listener to the named event.
  
          Parameters
          ----------
          name : str
              The name of the event.
          listener : Callable
              The consumer of the named event.
          priority : int
              Number in range(10) used to assign the ordering in which listeners process the event.