class_docstr: Generates prior towers for Phoenix.
class_docstr_tok: ["Generates","prior","towers","for","Phoenix","."]
code: def _nonadaptive_ensemble(
      self,
      logits_dimension,
      relevant_trials,
      is_training,
      num_trials_to_consider,
      width,
      my_model_dir,
  ):
      best_trials = self._metadata.get_best_k(
          trials=relevant_trials, k=num_trials_to_consider
      )
  
      if not best_trials:
          raise tf.errors.FailedPreconditionError(
              None, None, "No completed trials to perform ensembling."
          )
  
      if len(best_trials) < width:
          # Not enough trials in the pool. Adding all available.
          previous_model_dirs = [
              architecture_utils.DirectoryHandler.trial_dir(trial)
              for trial in sorted(best_trials, key=lambda x: x.id)
          ]
      else:
          random_sample = random.sample(
              list(range(len(best_trials))), width
          )
          previous_model_dirs = [
              architecture_utils.DirectoryHandler.trial_dir(trial)
              for trial in sorted(
                  [best_trials[i] for i in random_sample],
                  key=lambda x: x.id,
              )
          ]
  
      return trial_utils.import_towers_multiple_trials(
          phoenix_spec=self._phoenix_spec,
          is_training=is_training,
          logits_dimension=logits_dimension,
          previous_model_dirs=previous_model_dirs,
          force_freeze=self._force_freeze,
          allow_auxiliary_head=self._allow_auxiliary_head,
          caller_generator=self.generator_name(),
          my_model_dir=my_model_dir,
      )
  
file_path: model_search/model_search/generators/prior_generator.py
imports: import random
  from model_search.architecture import architecture_utils
  from model_search.generators import base_tower_generator
  from model_search.generators import trial_utils
  import tensorflow.compat.v2
label_desc: Use image node_id 4 for calling the PriorGenerator obj's underlying member method code with example usage: obj._nonadaptive_ensemble(logits_dimension, relevant_trials, is_training, num_trials_to_consider, width, my_model_dir) and returns: trial_utils