<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def detach(self, listener):
 """Detach a listening object so that it won't receive any events anymore."""

        if listener in self.listeners:
            self.listeners.remove(listener)