code: def get_architecture(directory, tower_name="search_generator_0"):
      """Given a trial directory and a tower name, returns its architecture.
  
      Args:
        directory: string - a model directory (that includes checkpoints).
        tower_name: string - the tower name we are trying to retrieve the
          architecutre for.
  
      Returns:
        np.array of ints holding the architecture of the Phoenix tower.
      """
  
      checkpoint = tf.train.latest_checkpoint(directory)
      trials = 3
      while checkpoint is None and trials >= 1:
          checkpoint = tf.train.latest_checkpoint(directory)
          time.sleep(1)
          trials -= 1
  
      reader = tf.compat.v1.train.NewCheckpointReader(checkpoint)
      return reader.get_tensor("architectures/{}".format(tower_name))
  
imports: import collections
  import os
  import string
  import time
  from absl import flags
  from absl import logging
  from model_search import block
  from model_search import block_builder
  from model_search import hparam
  from model_search import utils
  from model_search.proto import hparam_pb2
  from model_search.proto import phoenix_spec_pb2
  from model_search.proto import transfer_learning_spec_pb2
  import numpy
  import tensorflow.compat.v2
  import tf_slim
  from google.protobuf import text_format
label_desc: Use image node_id 5 for calling a global function with example usage: get_architecture(directory, tower_name) and returns: reader