human
I wrote the below code

    def convert_stream(stream):
        if (stream is None):
            return u''
        else:
            return u'\n'.join(re.split('\\r?\\n', stream.decode('utf-8', 'ignore').rstrip()))
    if (stdout is __sentinel__):
        stdout = PIPE
    if (stderr is __sentinel__):
        stderr = STDOUT
    p = external_command(command, cwd=cwd, shell=shell, env=env, stdin=stdin, stdout=stdout, stderr=stderr, preexec_fn=preexec_fn, use_texpath=use_texpath, show_window=show_window)
    (stdout, stderr) = p.communicate()
    return (p.returncode, convert_stream(stdout), convert_stream(stderr))

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

def execute_command(command, cwd=None, shell=False, env=None, stdin=__sentinel__, stdout=__sentinel__, stderr=__sentinel__, preexec_fn=None, use_texpath=True, show_window=False):