human
I wrote the below code

    clinic_args = []
    allow_kwargs = False
    optional = False
    while string:
        match = re.match('(?:(?:(\\[),?    ?|,    ?|)(\\w+)|,    ?/)\\]*', string)
        string = string[len(match.group(0)):]
        if (not match.group(2)):
            allow_kwargs = True
            continue
        optional = (optional or bool(match.group(1)))
        word = match.group(2)
        clinic_args.append((word, optional, allow_kwargs))
    def f(func):
        def wrapper(evaluator, obj, arguments):
            debug.dbg(('builtin    start    %s' % obj), color='MAGENTA')
            try:
                lst = list(arguments.eval_argument_clinic(clinic_args))
            except ValueError:
                return set()
            else:
                kwargs = {}
                if want_context:
                    kwargs['context'] = arguments.context
                if want_obj:
                    kwargs['obj'] = obj
                if want_arguments:
                    kwargs['arguments'] = arguments
                return func(evaluator, *lst, **kwargs)
            finally:
                debug.dbg('builtin    end', color='MAGENTA')
        return wrapper
    return f

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

def argument_clinic(string, want_obj=False, want_context=False, want_arguments=False):