code: def connect(self, f, mode=None):
          
  
          mode = mode or self.STRONG
          self.logger.debug("connecting %r with mode %r", f, mode)
          return self._connect(mode(f))
docs: Connect an object `f` to the signal. The type the object needs to have
          depends on `mode`, but usually it needs to be a callable.
  
          :meth:`connect` returns an opaque token which can be used with
          :meth:`disconnect` to disconnect the object from the signal.
  
          The default value for `mode` is :attr:`STRONG`. Any decorator can be
          used as argument for `mode` and it is applied to `f`. The result is
          stored internally and is what will be called when the signal is being
          emitted.
  
          If the result of `mode` returns a false value during emission, the
          connection is removed.
  
          .. note::
  
             The return values required by the callable returned by `mode` and
             the one required by a callable passed to `f` using the predefined
             modes are complementary!
  
             A callable `f` needs to return true to be removed from the
             connections, while a callable returned by the `mode` decorator needs
             to return false.
  
          Existing modes are listed below.