<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def listener(self, event):
 """Create a listener from a decorated function. :param event: Event to listen to. """


        def decorator(listener):
            self.listeners[event].append(listener)
            return listener

        return decorator