human
I wrote the below code

    fn_spec = inspectutils.GetFullArgSpec(fn)
    all_args = (fn_spec.args + fn_spec.kwonlyargs)
    metadata = decorators.GetMetadata(fn)
    num_required_args = (len(fn_spec.args) - len(fn_spec.defaults))
    required_kwonly = (set(fn_spec.kwonlyargs) - set(fn_spec.kwonlydefaults))
    def _ParseFn(args):
        'Parses    the    list    of    `args`    into    (varargs,    kwargs),    remaining_args.'
        (kwargs, remaining_args) = _ParseKeywordArgs(args, all_args, fn_spec.varkw)
        (parsed_args, kwargs, remaining_args, capacity) = _ParseArgs(fn_spec.args, fn_spec.defaults, num_required_args, kwargs, remaining_args, metadata)
        if (fn_spec.varargs or fn_spec.varkw):
            capacity = True
        extra_kw = (set(kwargs) - set(fn_spec.kwonlyargs))
        if ((fn_spec.varkw is None) and extra_kw):
            raise FireError('Unexpected    kwargs    present:', extra_kw)
        missing_kwonly = (set(required_kwonly) - set(kwargs))
        if missing_kwonly:
            raise FireError('Missing    required    flags:', missing_kwonly)
        if (fn_spec.varargs is not None):
            (varargs, remaining_args) = (remaining_args, [])
        else:
            varargs = []
        for (index, value) in enumerate(varargs):
            varargs[index] = _ParseValue(value, None, None, metadata)
        varargs = (parsed_args + varargs)
        consumed_args = args[:(len(args) - len(remaining_args))]
        return ((varargs, kwargs), consumed_args, remaining_args, capacity)
    return _ParseFn

What's a good function header?

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

def _MakeParseFn(fn):