code: def dispatch(routes, env, start_resp):
      urls = routes.bind_to_environ(env)
      try:
          (handler, args), kw = urls.match()
      except HTTPException as e:
          return e(env, start_resp)
      else:
          args = (Request(env),) + args
          kw = _del_underscore_vars(kw)
          try:
              return handler(*args, **kw)(env, start_resp)
          except HTTPException as e:
              return e(env, start_resp)
  
imports: import io
  import json
  import logging
  import socket
  from werkzeug import routing
  from werkzeug import serving
  from werkzeug import exceptions
  from werkzeug.middleware.shared_data import SharedDataMiddleware
  from werkzeug.wrappers import Request, Response
label_desc: Use image node_id 5 for calling a global function with example usage: dispatch(routes, env, start_resp) and returns: e, handler, e