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

    def callback(lexer, match, context):
        text = match.group()
        extra = ''
        if start:
            context.next_indent = len(text)
            if (context.next_indent < context.indent):
                while (context.next_indent < context.indent):
                    context.indent = context.indent_stack.pop()
                if (context.next_indent > context.indent):
                    extra = text[context.indent:]
                    text = text[:context.indent]
        else:
            context.next_indent += len(text)
        if text:
            (yield (match.start(), TokenClass, text))
        if extra:
            (yield ((match.start() + len(text)), TokenClass.Error, extra))
        context.pos = match.end()
    return callback

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

def save_indent(TokenClass, start=False):