human
Here's a good function header given the following:
I wrote the below code

    class _SignalsCaught(object, ):
        def __init__(self):
            self.heard = []
        def add(self, *args, **kwargs):
            '    The    actual    handler    of    the    signal.    '
            self.heard.append((args, kwargs))
        def assert_heard_one(self, *args, **kwargs):
            '    The    signal    fired    once,    and    with    the    arguments    given    '
            if (len(self.heard) == 0):
                raise AssertionError('No    signals    were    fired')
            elif (len(self.heard) > 1):
                msg = '{0}    signals    were    fired'.format(len(self.heard))
                raise AssertionError(msg)
            elif (self.heard[0] != (args, kwargs)):
                msg = 'One    signal    was    heard,    but    with    incorrect    arguments:    Got    ({0})    expected    ({1},    {2})'
                raise AssertionError(msg.format(self.heard[0], args, kwargs))
        def assert_heard_none(self, *args, **kwargs):
            '    The    signal    fired    no    times    '
            if (len(self.heard) >= 1):
                msg = '{0}    signals    were    fired'.format(len(self.heard))
                raise AssertionError(msg)
    results = _SignalsCaught()
    signal.connect(results.add)
    try:
        (yield results)
    finally:
        signal.disconnect(results.add)

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

@contextmanager
def listen_to(signal):