code: def test_make_template_with_defun(self):
      def variable_scoped_function_no_return_value(scope_name):
          # defun cannot compile functions that return non-Tensor objects
          with variable_scope.variable_scope(
              scope_name, reuse=variable_scope.AUTO_REUSE
          ):
              _ = variable_scope.get_variable(
                  "dummy",
                  shape=[1],
                  initializer=init_ops.zeros_initializer(),
              )
  
      tmpl = template.make_template_internal(
          "s1",
          variable_scoped_function_no_return_value,
          create_graph_function_=True,
          scope_name="test",
      )
  
      # The first invocation of tmpl1 creates variables, the second should
      # be executed as a graph function.
      tmpl()
      v1 = tmpl.variables
      tmpl()
      v2 = tmpl.variables
  
      self.assertEqual(len(v1), len(v2))
      for v, w in zip(v1, v2):
          self.assertIs(v, w)
      self.assertEqual("s1/test/dummy:0", v1[0].name)
  
imports: import functools
  import traceback
  from tensorflow.python.client import session
  from tensorflow.python.eager import context
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import random_seed
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import template
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  import tensorflow.python.ops.nn_grad
  from tensorflow.python.platform import test
  from tensorflow.python.training import gradient_descent
label_desc: Use image node_id 30 for calling the TemplateTest obj's underlying member method code with example usage: obj.test_make_template_with_defun() without return types