code: def test_template_global(app):
      bp = flask.Blueprint("bp", __name__)
  
      @bp.app_template_global()
      def get_answer():
          return 42
  
      # Make sure the function is not in the jinja_env already
      assert "get_answer" not in app.jinja_env.globals.keys()
      app.register_blueprint(bp)
  
      # Tests
      assert "get_answer" in app.jinja_env.globals.keys()
      assert app.jinja_env.globals["get_answer"] is get_answer
      assert app.jinja_env.globals["get_answer"]() == 42
  
      with app.app_context():
          rv = flask.render_template_string("{{ get_answer() }}")
          assert rv == "42"
  
imports: import pytest
  from jinja2 import TemplateNotFound
  from werkzeug.http import parse_cache_control_header
  import flask
label_desc: Use image node_id 36 for calling a global function with example usage: test_template_global(app) and returns: int