code: def connect(self, receiver, sender):
          '''
          Connects a signal to a receiver function
  
          :param receiver:
              The callback function which will be connected to this signal
  
          :param sender:
              Specifies a particular sender to receive signals from.
              Used to limit the receiver function to signal from particular sender types
          '''
          logger.info('Signal connected: {}'.format(receiver))
          ''' connect a receiver to a sender for signaling '''
          assert callable(receiver)
          receiver_id = _make_id(receiver)
          sender_id = _make_id(sender)
          r = ref
          if hasattr(receiver, '__self__') and hasattr(receiver, '__func__'):
              r = WeakMethod
  
          receiver = r(receiver)
  
          self.receivers.setdefault((receiver_id, sender_id), receiverf connect(self, receiver, sender):
          '''
          Connects a signal to a receiver function
  
          :param receiver:
              The callback function which will be connected to this signal
  
          :param sender:
              Specifies a particular sender to receive signals from.
              Used to limit the receiver function to signal from particular sender types
          '''
          logger.info('Signal connected: {}'.format(receiver))
          ''' connect a receiver to a sender for signaling '''
          assert callable(receiver)
          receiver_id = _make_id(receiver)
          sender_id = _make_id(sender)
          r = ref
          if hasattr(receiver, '__self__') and hasattr(receiver, '__func__'):
              r = WeakMethod
  
          receiver = r(receiver)
  
          self.receivers.setdefault((receiver_id, sender_id), receiver)
docs: Connects a signal to a receiver function
  
          :param receiver:
              The callback function which will be connected to this signal
  
          :param sender:
              Specifies a particular sender to receive signals from.
              Used to limit the receiver function to signal from particular sender types