def disconnect(self, receiver=None, sender=None, weak=None, dispatch_uid=None):
if weak is not None:<EOL><INDENT>logging.WARNING("<STR_LIT>")<EOL><DEDENT>if dispatch_uid:<EOL><INDENT>lookup_key = (dispatch_uid, _make_id(sender))<EOL><DEDENT>else:<EOL><INDENT>lookup_key = (_make_id(receiver), _make_id(sender))<EOL><DEDENT>disconnected = False<EOL>with self.lock:<EOL><INDENT>self._clear_dead_receivers()<EOL>for index in range(len(self.receivers)):<EOL><INDENT>(r_key, _) = self.receivers[index]<EOL>if r_key == lookup_key:<EOL><INDENT>disconnected = True<EOL>del self.receivers[index]<EOL>break<EOL><DEDENT><DEDENT>self.sender_receivers_cache.clear()<EOL><DEDENT>return disconnected<EOL>
Disconnect receiver from sender for signal.

If weak references are used, disconnect need not be called. The receiver
will be remove from dispatch automatically.

Arguments:

    receiver
        The registered receiver to disconnect. May be none if
        dispatch_uid is specified.

    sender
        The registered sender to disconnect

    dispatch_uid
        the unique identifier of the receiver to disconnect