human
I wrote the below code

    (etype, evalue, etb) = einfo
    if isinstance(etype, type):
        etype = etype.__name__
    pyver = ((('Python    ' + sys.version.split()[0]) + ':    ') + sys.executable)
    date = time.ctime(time.time())
    head = (('%s\n%s\n%s\n' % (str(etype), pyver, date)) + '\nA    problem    occurred    in    a    Python    script.        Here    is    the    sequence    of\nfunction    calls    leading    up    to    the    error,    in    the    order    they    occurred.\n')
    frames = []
    records = inspect.getinnerframes(etb, context)
    for (frame, file, lnum, func, lines, index) in records:
        file = ((file and os.path.abspath(file)) or '?')
        (args, varargs, varkw, locals) = inspect.getargvalues(frame)
        call = ''
        if (func != '?'):
            call = (('in    ' + func) + inspect.formatargvalues(args, varargs, varkw, locals, formatvalue=(lambda value: ('=' + pydoc.text.repr(value)))))
        highlight = {}
        def reader(lnum=[lnum]):
            highlight[lnum[0]] = 1
            try:
                return linecache.getline(file, lnum[0])
            finally:
                lnum[0] += 1
        vars = scanvars(reader, frame, locals)
        rows = [('    %s    %s' % (file, call))]
        if (index is not None):
            i = (lnum - index)
            for line in lines:
                num = ('%5d    ' % i)
                rows.append((num + line.rstrip()))
                i += 1
        (done, dump) = ({}, [])
        for (name, where, value) in vars:
            if (name in done):
                continue
            done[name] = 1
            if (value is not __UNDEF__):
                if (where == 'global'):
                    name = ('global    ' + name)
                elif (where != 'local'):
                    name = (where + name.split('.')[(-1)])
                dump.append(('%s    =    %s' % (name, pydoc.text.repr(value))))
            else:
                dump.append((name + '    undefined'))
        rows.append('\n'.join(dump))
       ...

What's a good function header?

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

def text(einfo, context=5):