code: def test_dynamic_inheritance(self, env):
      env = Environment(
          loader=DictLoader(
              {
                  "default1": "DEFAULT1{% block x %}{% endblock %}",
                  "default2": "DEFAULT2{% block x %}{% endblock %}",
                  "child": "{% extends default %}{% block x %}CHILD{% endblock %}",
              }
          )
      )
      tmpl = env.get_template("child")
      for m in range(1, 3):
          assert (
              tmpl.render(default=f"default{m}") == f"DEFAULT{m}CHILD"
          )
  
imports: import pytest
  from jinja2 import DictLoader
  from jinja2 import Environment
  from jinja2 import TemplateRuntimeError
  from jinja2 import TemplateSyntaxError
label_desc: Use image node_id 10 for calling the TestInheritance obj's underlying member method code with example usage: obj.test_dynamic_inheritance(env) without return types