human
I wrote the below code

    if (log_level is not None):
        txaio.start_logging(level=log_level)
    loop = asyncio.get_event_loop()
    log = txaio.make_logger()
    @asyncio.coroutine
    def exit():
        return loop.stop()
    def nicely_exit(signal):
        log.info('Shutting    down    due    to    {signal}', signal=signal)
        for task in asyncio.Task.all_tasks():
            task.cancel()
        asyncio.ensure_future(exit())
    loop.add_signal_handler(signal.SIGINT, partial(nicely_exit, 'SIGINT'))
    loop.add_signal_handler(signal.SIGTERM, partial(nicely_exit, 'SIGTERM'))
    component._run(loop, components)
    try:
        loop.run_forever()
    except asyncio.CancelledError:
        pass

What's a good function header?

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

def run(components, log_level='info'):