code: def add_listener(self, listener):
          
          internal_listener = partial(self._call_in_reactor_thread, listener)
          self._internal_listeners[listener] = internal_listener
          return self._client.add_listener(internal_listener)
docs: 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.