'Disconnect receiver from sender for signal.
If weak references are used, disconnect needn\'t be called.
The receiver will be removed from dispatch automatically.
Arguments:
receiver (Callable): The registered receiver to disconnect.
May be none if `dispatch_uid` is specified.
sender (Any): The registered sender to disconnect.
weak (bool): The weakref state to disconnect.
dispatch_uid (Hashable): The unique identifier of the receiver
to disconnect.'

def disconnect(self, receiver=None, sender=None, weak=None, dispatch_uid=None):

    if (weak is not None):
        warnings.warn(u'Passing    `weak`    to    disconnect    has    no    effect.', CDeprecationWarning, stacklevel=2)
    if dispatch_uid:
        lookup_key = (dispatch_uid, _make_id(sender))
    else:
        lookup_key = (_make_id(receiver), _make_id(sender))
    disconnected = False
    with self.lock:
        self._clear_dead_receivers()
        for index in range(len(self.receivers)):
            (r_key, _) = self.receivers[index]
            if (r_key == lookup_key):
                disconnected = True
                del self.receivers[index]
                break
        self.sender_receivers_cache.clear()
    return disconnected
