code: def test_init_variables(
      self, new_architecture, expected_output, new_tower_name
  ):
      # Force graph mode
      with tf.compat.v1.Graph().as_default():
          directory = self.get_temp_dir()
          architecture = graph_architecture.Architecture(
              node_list=[
                  graph_architecture.Node(1),  # convolution
                  graph_architecture.Node(3),  # convolution
                  graph_architecture.Node(34),  # flatten plate
              ],
              tower_name="test_tower",
          )
          phoenix_spec = phoenix_spec_pb2.PhoenixSpec(
              problem_type=phoenix_spec_pb2.PhoenixSpec.CNN
          )
          with self.test_session(graph=tf.Graph()) as sess:
              input_tensor = tf.zeros([100, 32, 32, 3])
              _ = architecture.construct_tower(
                  phoenix_spec=phoenix_spec,
                  input_tensor=input_tensor,
                  is_training=True,
                  lengths=None,
                  logits_dimension=10,
                  is_frozen=False,
                  dropout_rate=None,
              )
              saver = tf.compat.v1.train.Saver()
              sess.run(tf.compat.v1.global_variables_initializer())
              sess.run(tf.compat.v1.local_variables_initializer())
              saver.save(sess, directory + "/ckpt")
  
          with self.test_session(graph=tf.Graph()) as sess:
              input_tensor = tf.zeros([100, 32, 32, 3])
              _ = new_architecture.construct_tower(
                  phoenix_spec=phoenix_spec,
                  input_tensor=input_tensor,
                  is_training=True,
                  lengths=None,
                  logits_dimension=10,
                  is_frozen=False,
                  dropout_rate=None,
              )
              snapshotting_variables = (
                  architecture_utils.init_variables(
                      tf.train.latest_checkpoint(directory),
                      "Phoenix/test_tower",
                      "Phoenix/{}".format(new_tower_name),
                  )
              )
              self.assertCountEqual(
                  snapshotting_variables, expected_output
              )
  
file_path: model_search/model_search/architecture/graph_architecture_test.py
imports: from absl.testing import parameterized
  from model_search.architecture import architecture_utils
  from model_search.architecture import graph_architecture
  from model_search.proto import phoenix_spec_pb2
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 3 for calling the GraphArchitectureTest obj's underlying member method code with example usage: obj.test_init_variables(new_architecture, expected_output, new_tower_name) without return types