code: def test_custom_app_ctx_globals_class(app):
      class CustomRequestGlobals:
          def __init__(self):
              self.spam = "eggs"
  
      app.app_ctx_globals_class = CustomRequestGlobals
      with app.app_context():
          assert flask.render_template_string("{{ g.spam }}") == "eggs"
  
file_path: flask/tests/test_appctx.py
imports: import pytest
  import flask
  from flask.globals import app_ctx
  from flask.globals import request_ctx
label_desc: Use image node_id 12 for calling a global function with example usage: test_custom_app_ctx_globals_class(app) without return types