human
I wrote the below code

    global _PARSING_CACHE
    if (string in _PARSING_CACHE):
        stack = _PARSING_CACHE[string]
    elif (not _RE_STARTTOKEN.search(string)):
        return string
    else:
        stack = ParseStack()
    ncallable = 0
    for match in _RE_TOKEN.finditer(string):
        gdict = match.groupdict()
        if gdict['singlequote']:
            stack.append(gdict['singlequote'])
        elif gdict['doublequote']:
            stack.append(gdict['doublequote'])
        elif gdict['end']:
            if (ncallable <= 0):
                stack.append(')')
                continue
            args = []
            while stack:
                operation = stack.pop()
                if callable(operation):
                    if (not strip):
                        stack.append((operation, [arg for arg in reversed(args)]))
                    ncallable -= 1
                    break
                else:
                    args.append(operation)
        elif gdict['start']:
            funcname = _RE_STARTTOKEN.match(gdict['start']).group(1)
            try:
                stack.append(_INLINE_FUNCS[funcname])
            except KeyError:
                stack.append(_INLINE_FUNCS['nomatch'])
                stack.append(funcname)
            ncallable += 1
        elif gdict['escaped']:
            token = gdict['escaped'].lstrip('\\')
            stack.append(token)
        elif gdict['comma']:
            if (ncallable > 0):
                stack.append(None)
            else:
                stack.append(',')
        else:
            stack.append(gdict['rest'])
    if (ncallable > 0):
        return string
    if ((_STACK_MAXSIZE > 0) and (_STACK_MAXSIZE < len(stack))):
        return (string + gdict['stackfull'](*args, **kwargs))
    else:
        _PARSING_CACHE[string] = stack
    def _run_stack(item, depth=0):
        retval = item
        if isinstance(item, tuple):
            if strip:
                return ''
            else:
                (func, arglist) = item
                args = ['']
     ...

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

def parse_inlinefunc(string, strip=False, **kwargs):