human
I wrote the below code

    middleware = list(middleware)
    if (reloader in middleware):
        relr = reloader(None)
        relrcheck = relr.check
        middleware.remove(reloader)
    else:
        relr = None
        relrcheck = (lambda : None)
    def wsgifunc(e, r):
        _load(e)
        relrcheck()
        result = func()
        is_generator = (result and hasattr(result, 'next'))
        if is_generator:
            try:
                firstchunk = result.next()
            except StopIteration:
                firstchunk = ''
        (status, headers, output) = (ctx.status, ctx.headers, ctx.output)
        _unload()
        r(status, headers)
        if is_generator:
            return itertools.chain([firstchunk], result)
        elif isinstance(output, str):
            return [output]
        elif hasattr(output, 'next'):
            return output
        else:
            raise Exception, 'Invalid    web.context.output'
    for x in middleware:
        wsgifunc = x(wsgifunc)
    if relr:
        relr.func = wsgifunc
        return wsgifunc
    return wsgifunc

What's a good function header?

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

def wsgifunc(func, *middleware):