human
I wrote the below code

    options = RunOptions(top_level=top_level)
    configure_eliot_logging_for_acceptance()
    try:
        options.parseOptions(args)
    except UsageError as e:
        sys.stderr.write(('%s:    %s\n' % (base_path.basename(), e)))
        raise SystemExit(1)
    runner = options.runner
    from flocker.common.script import eliot_logging_service
    log_writer = eliot_logging_service(destination=FileDestination(file=open(('%s.log' % (base_path.basename(),)), 'a')), reactor=reactor, capture_stdout=False)
    log_writer.startService()
    reactor.addSystemEventTrigger('before', 'shutdown', log_writer.stopService)
    cluster = None
    results = []
    setup_succeeded = False
    reached_finally = False
    def cluster_cleanup():
        if (not reached_finally):
            print 'interrupted...'
        print 'stopping    cluster'
        return runner.stop_cluster(reactor)
    cleanup_trigger_id = reactor.addSystemEventTrigger('before', 'shutdown', cluster_cleanup)
    try:
        (yield runner.ensure_keys(reactor))
        cluster = (yield runner.start_cluster(reactor))
        if (options['distribution'] in ('centos-7', 'rhel-7', 'ubuntu-16.04')):
            remote_logs_file = open('remote_logs.log', 'a')
            for node in cluster.all_nodes:
                results.append(capture_journal(reactor, node.address, remote_logs_file))
        elif (options['distribution'] in ('ubuntu-14.04',)):
            remote_logs_file = open('remote_logs.log', 'a')
            for node in cluster.all_nodes:
                results.append(capture_upstart(reactor, node.address, remote_logs_file))
        gather_deferreds(results)
        if (not options['no-pull']):
            (yield perform(make_dispatcher(reactor), parallel([run_remotely(username='root', address=node.address, commands=task_pull_docker_images()) for node in cluster.agent_nodes])))
        setup_succeeded = True
        result = (yield run_tests(reactor=reactor, cluster=cluster, trial_args=options['trial-args'],...

What's a good function header?
assistant
#Here is Python program to print 'interrupted.

@inlineCallbacks
def main(reactor, args, base_path, top_level):