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

    def child_execution(child_connection, input_stream):
        try:
            setup_package(pkg, dirty=dirty)
            function(input_stream)
            child_connection.send(None)
        except StopIteration as e:
            tty.msg(e.message)
            child_connection.send(None)
        except:
            (exc_type, exc, tb) = sys.exc_info()
            tb_string = traceback.format_exc()
            package_context = get_package_context(tb)
            build_log = None
            if hasattr(pkg, 'log_path'):
                build_log = pkg.log_path
            msg = ('%s:    %s' % (str(exc_type.__name__), str(exc)))
            ce = ChildError(msg, tb_string, build_log, package_context)
            child_connection.send(ce)
        finally:
            child_connection.close()
    (parent_connection, child_connection) = multiprocessing.Pipe()
    try:
        try:
            input_stream = lang.duplicate_stream(sys.stdin)
        except OSError as e:
            if (e.errno == errno.EINVAL):
                tty.debug('Using    devnull    as    input_stream')
                input_stream = open(os.devnull)
        p = multiprocessing.Process(target=child_execution, args=(child_connection, input_stream))
        p.start()
    finally:
        input_stream.close()
    child_exc = parent_connection.recv()
    p.join()
    if (child_exc is not None):
        raise child_exc

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

def fork(pkg, function, dirty=False):