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

    if isinstance(components, Component):
        components = [components]
    if (type(components) != list):
        raise ValueError('"components"    must    be    a    list    of    Component    objects    -    encountered    {0}'.format(type(components)))
    for c in components:
        if (not isinstance(c, Component)):
            raise ValueError('"components"    must    be    a    list    of    Component    objects    -    encountereditem    of    type    {0}'.format(type(c)))
    log = txaio.make_logger()
    def component_success(comp, arg):
        log.debug("Component    '{c}'    successfully    completed:    {arg}", c=comp, arg=arg)
        return arg
    def component_failure(comp, f):
        log.error("Component    '{c}'    error:    {msg}", c=comp, msg=txaio.failure_message(f))
        log.debug('Component    error:    {tb}', tb=txaio.failure_format_traceback(f))
        return None
    def component_start(comp):
        d = txaio.as_future(comp.start, reactor)
        txaio.add_callbacks(d, partial(component_success, comp), partial(component_failure, comp))
        return d
    dl = []
    for comp in components:
        d = component_start(comp)
        dl.append(d)
    done_d = txaio.gather(dl, consume_exceptions=False)
    def all_done(arg):
        log.debug('All    components    ended.
   stopping    reactor')
        if isinstance(arg, Failure):
            log.error('Something    went    wrong:    {log_failure}', failure=arg)
        try:
            reactor.stop()
        except ReactorNotRunning:
            pass
    txaio.add_callbacks(done_d, all_done, all_done)
    return done_d

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

def _run(reactor, components):