<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_listener(self, name, listener, priority=5):
 """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. """

        self._event_types[name].listeners[priority].append(listener)