code: def test_trainable_variables(self):
      # Make sure trainable_variables are created.
      with variable_scope.variable_scope("foo2"):
          # Create two templates with the same name, ensure scopes are made unique.
          ta = template.make_template(
              "bar", variable_scoped_function, True
          )
          tb = template.make_template(
              "bar", variable_scoped_function, True
          )
  
      # Initially there are not variables created.
      self.assertEqual([], list(ta.trainable_variables))
      self.assertEqual([], list(tb.trainable_variables))
      # After calling there are variables created.
      ta()
      tb()
      # Ensure we can get the scopes before either template is actually called.
      self.assertEqual(1, len(ta.trainable_variables))
      self.assertEqual(1, len(tb.trainable_variables))
      # None non-trainable variable was created.
      self.assertEqual([], list(ta.non_trainable_variables))
      self.assertEqual([], list(tb.non_trainable_variables))
      # Ensure variables returns all the variables.
      self.assertEqual(1, len(ta.variables))
      self.assertEqual(1, len(tb.variables))
  
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 27 for calling the TemplateTest obj's underlying member method code with example usage: obj.test_trainable_variables() without return types