code: def test_import_tower(self, shared_input):
      np.random.seed(42)
      test_input = np.random.random([1, 32, 32, 3])
      # Force graph mode
      with tf.compat.v1.Graph().as_default():
          directory = self.get_temp_dir()
          architecture = np.array([1, 3, 34])
          phoenix_spec = phoenix_spec_pb2.PhoenixSpec(
              problem_type=phoenix_spec_pb2.PhoenixSpec.CNN
          )
          phoenix_spec.is_input_shared = shared_input
          features = {}
          shared_input_tensor = None
          with self.test_session(graph=tf.Graph()) as sess:
              input_tensor_1 = tf.compat.v1.placeholder(
                  dtype=tf.float32,
                  shape=[None, 32, 32, 3],
                  name="input_1",
              )
              tf.random.set_seed(1234)
              tower_spec_1 = architecture_utils.construct_tower(
                  phoenix_spec=phoenix_spec,
                  input_tensor=input_tensor_1,
                  tower_name="test_tower",
                  architecture=architecture,
                  is_training=True,
                  lengths=None,
                  logits_dimension=10,
                  hparams=hp.HParams(),
                  model_directory=self.get_temp_dir(),
                  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())
              logits_val_1 = sess.run(
                  tower_spec_1.logits_spec.logits,
                  feed_dict={input_tensor_1: test_input},
              )
              saver.save(sess, directory + "/ckpt")
  
          with self.test_session(graph=tf.Graph()) as sess:
              input_tensor_2 = tf.compat.v1.placeholder(
                  dtype=tf.float32,
                  shape=[None, 32, 32, 3],
                  name="input_2",
              )
              if shared_input:
                  shared_input_tensor = input_tensor_2
  
                  def _input_layer_fn(
                      features,
                      is_training,
                      scope_name="Phoenix/Input",
                      lengths_feature_name=None,
                  ):
                      del (
                          features,
                          is_training,
                          scope_name,
                          lengths_feature_name,
                      )
                      return None, None
  
              else:
                  features = {"x": input_tensor_2}
  
                  def _input_layer_fn(
                      features,
                      is_training,
                      scope_name="Phoenix/Input",
                      lengths_feature_name=None,
                  ):
                      del is_training, lengths_feature_name
                      with tf.compat.v1.variable_scope(scope_name):
                          return (
                              tf.cast(features["x"], dtype=tf.float32),
                              None,
                          )
  
              tf.random.set_seed(1234)
              tower_spec_2 = architecture_utils.import_tower(
                  features=features,
                  input_layer_fn=_input_layer_fn,
                  phoenix_spec=phoenix_spec,
                  shared_input_tensor=shared_input_tensor,
                  original_tower_name="test_tower",
                  new_tower_name="imported_tower",
                  model_directory=directory,
                  new_model_directory=self.get_temp_dir(),
                  is_training=True,
                  logits_dimension=10,
                  shared_lengths=None,
                  force_snapshot=False,
                  force_freeze=False,
              )
              sess.run(tf.compat.v1.global_variables_initializer())
              sess.run(tf.compat.v1.local_variables_initializer())
              logits_val_2 = sess.run(
                  tower_spec_2.logits_spec.logits,
                  feed_dict={input_tensor_2: test_input},
              )
  
          self.assertAllClose(logits_val_1, logits_val_2, rtol=1e-3)
  
imports: from absl.testing import parameterized
  from model_search import block_builder
  from model_search import hparam
  from model_search.architecture import architecture_utils
  from model_search.metadata import trial
  from model_search.proto import phoenix_spec_pb2
  from model_search.proto import transfer_learning_spec_pb2
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 12 for calling the ArchitectureUtilsTest obj's underlying member method code with example usage: obj.test_import_tower(shared_input) and returns: None,  None, tf,  None