code: def test_template_data(self, env):
      env = Environment(autoescape=True)
      t = env.from_string(
          "{% macro say_hello(name) %}"
          "<p>Hello {{ name }}!</p>{% endmacro %}"
          '{{ say_hello("<blink>foo</blink>") }}'
      )
      escaped_out = "<p>Hello &lt;blink&gt;foo&lt;/blink&gt;!</p>"
      assert t.render() == escaped_out
      assert text_type(t.module) == escaped_out
      assert escape(t.module) == escaped_out
      assert t.module.say_hello("<blink>foo</blink>") == escaped_out
      assert (
          escape(
              t.module.say_hello(EvalContext(env), "<blink>foo</blink>")
          )
          == escaped_out
      )
      assert (
          escape(t.module.say_hello("<blink>foo</blink>"))
          == escaped_out
      )
  
imports: import pytest
  from jinja2 import Environment
  from jinja2 import escape
  from jinja2 import Markup
  from jinja2._compat import text_type
  from jinja2.exceptions import SecurityError
  from jinja2.exceptions import TemplateRuntimeError
  from jinja2.exceptions import TemplateSyntaxError
  from jinja2.nodes import EvalContext
  from jinja2.sandbox import ImmutableSandboxedEnvironment
  from jinja2.sandbox import SandboxedEnvironment
  from jinja2.sandbox import unsafe
label_desc: Use image node_id 5 for calling the TestSandbox obj's underlying member method code with example usage: obj.test_template_data(env) without return types