code: def test_internal_variable_reuse(self):
      def nested():
          with variable_scope.variable_scope("nested") as vs:
              v1 = variable_scope.get_variable(
                  "x",
                  initializer=init_ops.zeros_initializer(),
                  shape=[],
              )
          with variable_scope.variable_scope(vs, reuse=True):
              v2 = variable_scope.get_variable("x")
          self.assertIs(v1, v2)
          return v1
  
      tmpl1 = template.make_template("s1", nested)
      tmpl2 = template.make_template("s1", nested)
  
      v1 = tmpl1()
      v2 = tmpl1()
      v3 = tmpl2()
      self.assertIs(v1, v2)
      self.assertIsNot(v1, v3)
      self.assertEqual("s1/nested/x:0", v1.name)
      self.assertEqual("s1_1/nested/x:0", v3.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 18 for calling the TemplateTest obj's underlying member method code with example usage: obj.test_internal_variable_reuse() and returns: v1