human
Complete this python program:
def execute_on_completion(application, config, callback):
assistant
#Here is the Python program you requested.

    """Call callback(environ) once complete response is sent
    """
    def inner(environ, start_response):
        try:
            result = application(environ, start_response)
        except:
            callback(environ)
            raise
        return generate_close_and_callback(result, callback, environ)
    return inner