<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_listener(self, listener):
 """Add the given listener to the wrapped client. The listener will be wrapped, so that it will be called in the reactor thread. This way, it can safely use Twisted APIs. """

        internal_listener = partial(self._call_in_reactor_thread, listener)
        self._internal_listeners[listener] = internal_listener
        return self._client.add_listener(internal_listener)