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

    LOG.debug('Entering    run_command.')
    assert isinstance(cmd, ((list, tuple) + six.string_types))
    LOG.debug('Setting    env    if    not    set.')
    if (not env):
        env = os.environ.copy()
    LOG.debug('Creating    subprocess.')
    process = subprocess.Popen(args=cmd, stdin=stdin, stdout=stdout, stderr=stderr, env=env, cwd=cwd, shell=shell, preexec_fn=preexec_func)
    def on_timeout_expired(timeout):
        global timed_out
        try:
            LOG.debug('Starting    process    wait.')
            process.wait(timeout=timeout)
        except subprocess.TimeoutExpired:
            LOG.debug('Timeout.')
            process.returncode = TIMEOUT_EXIT_CODE
            if kill_func:
                LOG.debug('Kill_func.')
                kill_func(process=process)
            else:
                LOG.debug('Kill    process.')
                process.kill()
    LOG.debug('Setting    up    process    and    callback.')
    timeout_thread = eventlet.spawn(on_timeout_expired, timeout)
    LOG.debug('Attaching    to    process.')
    (stdout, stderr) = process.communicate()
    timeout_thread.cancel()
    exit_code = process.returncode
    if (exit_code == TIMEOUT_EXIT_CODE):
        LOG.debug('Timeout.')
        timed_out = True
    else:
        LOG.debug('No    timeout.')
        timed_out = False
    LOG.debug('Returning.')
    return (exit_code, stdout, stderr, timed_out)

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

def run_command(cmd, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False, cwd=None, env=None, timeout=60, preexec_func=None, kill_func=None):