human
I wrote the below code

    environ = _get_environ(environ)
    response = []
    buffer = []
    def start_response(status, headers, exc_info=None):
        if (exc_info is not None):
            reraise(*exc_info)
        response[:] = [status, headers]
        return buffer.append
    app_rv = app(environ, start_response)
    close_func = getattr(app_rv, 'close', None)
    app_iter = iter(app_rv)
    if buffered:
        try:
            app_iter = list(app_iter)
        finally:
            if (close_func is not None):
                close_func()
    else:
        while (not response):
            buffer.append(next(app_iter))
        if buffer:
            app_iter = chain(buffer, app_iter)
        if ((close_func is not None) and (app_iter is not app_rv)):
            app_iter = ClosingIterator(app_iter, close_func)
    return (app_iter, response[0], Headers(response[1]))

What's a good function header?

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

def run_wsgi_app(app, environ, buffered=False):