human
I wrote the below code

    if (signal is None):
        raise errors.DispatcherTypeError(('Signal    cannot    be    None    (receiver=%r    sender=%r)' % (receiver, sender)))
    if weak:
        receiver = saferef.safeRef(receiver, onDelete=_removeReceiver)
    senderkey = id(sender)
    if connections.has_key(senderkey):
        signals = connections[senderkey]
    else:
        connections[senderkey] = signals = {}
    if (sender not in (None, Anonymous, Any)):
        def remove(object, senderkey=senderkey):
            _removeSender(senderkey=senderkey)
        try:
            weakSender = weakref.ref(sender, remove)
            senders[senderkey] = weakSender
        except:
            pass
    receiverID = id(receiver)
    if signals.has_key(signal):
        receivers = signals[signal]
        _removeOldBackRefs(senderkey, signal, receiver, receivers)
    else:
        receivers = signals[signal] = []
    try:
        current = sendersBack.get(receiverID)
        if (current is None):
            sendersBack[receiverID] = current = []
        if (senderkey not in current):
            current.append(senderkey)
    except:
        pass
    receivers.append(receiver)

What's a good function header?
assistant
#Here's a good function header.

def connect(receiver, signal=Any, sender=Any, weak=True):