code: def _create_auth_provider_verifier_app(expected_auth_key):
      """Generates a WSGI application for verifying AuthContextMiddleware.
  
      It should be placed after AuthContextMiddleware in the WSGI handler chain.
      It will generate a credential using the AuthContext populated by
      AuthContextMiddleware.
  
      Args:
        expected_auth_key: The auth key to be used for invoking the AuthContext.
          This key should correspond to the auth_providers used to configure
          the AuthContextMiddleware .
      """
  
      def _app(environ, start_response):
          ctx = context.from_environ(environ)
          credential = ctx.auth.get(expected_auth_key)
          start_response("200 OK", [("Content-Type", "text\plain")])
          return f"credential: {credential}"
  
      return _app
  
file_path: tensorboard/tensorboard/backend/auth_context_middleware_test.py
imports: from werkzeug import test
  from werkzeug import wrappers
  from tensorboard import auth
  from tensorboard import context
  from tensorboard import test
  from tensorboard.backend import auth_context_middleware
label_desc: Use image node_id 1 for calling a global function with example usage: _create_auth_provider_verifier_app(expected_auth_key) and returns: _app, str, credential