code: def connect(self, callback: Callable[[T_Event], Any]) -> Callable[[T_Event], Any]:
          
          assert check_argument_types()
          if self.listeners is None:
              self.listeners = []
          if callback not in self.listeners:
              self.listeners.append(callback)
  
          return callback
docs: Connect a callback to this signal.
  
          Each callable can only be connected once. Duplicate registrations are ignored.
  
          If you need to pass extra arguments to the callback, you can use :func:`functools.partial`
          to wrap the callable.
  
          :param callback: a callable that will receive an event object as its only argument.
          :return: the value of ``callback`` argument