def setup(self, environ=None):
        '''Set up the :class:`.WsgiHandler` the first time this
        middleware is accessed.
        '''
        from django.conf import settings
        from django.core.wsgi import get_wsgi_application
        #
        try:
            dotted = settings.WSGI_APPLICATION
        except __HOLE__:  # pragma nocover
            dotted = None
        if dotted:
            app = module_attribute(dotted)
        else:
            app = get_wsgi_application()
        app = middleware_in_executor(app)
        return WsgiHandler((wait_for_body_middleware, app))
dataset/ETHPy150Open quantmind/pulsar/pulsar/apps/pulse/__init__.py/Wsgi.setup