<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def make_middleware(self, app):
 """Wrap a WSGI application so that cleaning up happens after request end. """


        def application(environ, start_response):
            return ClosingIterator(app(environ, start_response), self.cleanup)

        return application