class_docstr: Converts a `tornado.web.Application` instance into a WSGI application.
  
  Example usage::
  
      import tornado.web
      import tornado.wsgi
      import wsgiref.simple_server
  
      class MainHandler(tornado.web.RequestHandler):
          def get(self):
              self.write("Hello, world")
  
      if __name__ == "__main__":
          application = tornado.web.Application([
              (r"/", MainHandler),
          ])
          wsgi_app = tornado.wsgi.WSGIAdapter(application)
          server = wsgiref.simple_server.make_server('', 8888, wsgi_app)
          server.serve_forever()
  
  See the `appengine demo
  <https://github.com/tornadoweb/tornado/tree/stable/demos/appengine>`_
  for an example of using this module to run a Tornado app on Google
  App Engine.
  
  In WSGI mode asynchronous methods are not supported.  This means
  that it is not possible to use `.AsyncHTTPClient`, or the
  `tornado.auth` or `tornado.websocket` modules.
  
  .. versionadded:: 4.0
class_docstr_tok: ["Converts","a","`","tornado.web.Application","`","instance","into","a","WSGI","application",".","Example","usage",":",":","import","tornado.web","import","tornado.wsgi","import","wsgiref.simple_server","class","MainHandler","(","tornado.web.RequestHandler",")",":","def","get","(","self",")",":","self.write","(","``","Hello",",","world","''",")","if","__name__","==","``","__main__","''",":","application","=","tornado.web.Application","(","[","(","r","''","\/","''",",","MainHandler",")",",","]",")","wsgi_app","=","tornado.wsgi.WSGIAdapter","(","application",")","server","=","wsgiref.simple_server.make_server","(","``",",","8888",",","wsgi_app",")","server.serve_forever","(",")","See","the","`","appengine","demo","<","https",":","\/\/github.com\/tornadoweb\/tornado\/tree\/stable\/demos\/appengine",">","`","_","for","an","example","of","using","this","module","to","run","a","Tornado","app","on","Google","App","Engine",".","In","WSGI","mode","asynchronous","methods","are","not","supported",".","This","means","that","it","is","not","possible","to","use","`",".AsyncHTTPClient","`",",","or","the","`","tornado.auth","`","or","`","tornado.websocket","`","modules",".","..","versionadded",":",":","4.0"]
code: def __init__(self, application):
      if isinstance(application, WSGIApplication):
          self.application = lambda request: web.Application.__call__(
              application, request
          )
      else:
          self.application = application
  
imports: from __future__ import absolute_import, division, print_function
  import sys
  from io import BytesIO
  import tornado
  from tornado.concurrent import Future
  from tornado import escape
  from tornado import httputil
  from tornado.log import access_log
  from tornado import web
  from tornado.escape import native_str
  from tornado.util import unicode_type, PY3
label_desc: Use image node_id 1 to create a new WSGIAdapter object from inherited base classes: object with example: obj = WSGIAdapter(application)