code: def import_towers_one_trial(
      phoenix_spec,
      is_training,
      logits_dimension,
      prev_model_dir,
      force_freeze,
      allow_auxiliary_head,
      caller_generator,
      my_model_dir,
  ):
      """Imports a previous trial to current model."""
      towers = []
      imported_towers = 0
      for generator in base_tower_generator.ALL_GENERATORS:
          num_towers = architecture_utils.get_number_of_towers(
              prev_model_dir, generator
          )
          # Import all towers from a given generator.
          for i in range(num_towers):
              tower_name = generator + "_{}".format(str(i))
              tower_ = tower.Tower.load(
                  phoenix_spec=phoenix_spec,
                  original_tower_name=tower_name,
                  new_tower_name=caller_generator
                  + "_{}".format(str(imported_towers)),
                  model_directory=prev_model_dir,
                  is_training=is_training,
                  logits_dimension=logits_dimension,
                  new_model_directory=my_model_dir,
                  force_freeze=force_freeze,
                  allow_auxiliary_head=allow_auxiliary_head,
              )
              towers.append(tower_)
              imported_towers += 1
  
      architecture_utils.set_number_of_towers(
          caller_generator, imported_towers
      )
      if my_model_dir:
          tf.io.gfile.makedirs(my_model_dir)
          with tf.io.gfile.GFile(
              os.path.join(
                  my_model_dir, _PREVIOUS_DEPENDENCIES_FILENAME
              ),
              "w+",
          ) as f:
              f.write(prev_model_dir)
      return towers
  
imports: import copy
  import enum
  import os
  from model_search import hparam
  from model_search.architecture import architecture_utils
  from model_search.architecture import tower
  from model_search.generators import base_tower_generator
  from model_search.metadata import trial
  from model_search.proto import distillation_spec_pb2
  from model_search.proto import ensembling_spec_pb2
  from model_search.proto import phoenix_spec_pb2
  import tensorflow.compat.v2
  from google.protobuf import text_format
label_desc: Use image node_id 12 for calling a global function with example usage: import_towers_one_trial(phoenix_spec, is_training, logits_dimension, prev_model_dir, force_freeze, allow_auxiliary_head, caller_generator, my_model_dir) and returns: towers