code: def test_nonadaptive_prior_graph(self):
      # Force graph mode
      with tf.compat.v1.Graph().as_default():
          spec = phoenix_spec_pb2.PhoenixSpec(
              problem_type=phoenix_spec_pb2.PhoenixSpec.DNN
          )
          spec.ensemble_spec.ensemble_search_type = (
              ensembling_spec_pb2.EnsemblingSpec.NONADAPTIVE_ENSEMBLE_SEARCH
          )
          spec.ensemble_spec.nonadaptive_search.width = 2
          spec.ensemble_spec.nonadaptive_search.num_trials_to_consider = (
              3
          )
          spec.is_input_shared = True
          generator = prior_generator.PriorGenerator(
              phoenix_spec=spec,
              metadata=ml_metadata_db.MLMetaData(
                  phoenix_spec=spec, study_name="", study_owner=""
              ),
          )
          fake_config = collections.namedtuple(
              "RunConfig", ["model_dir"]
          )
          run_config = fake_config(
              model_dir=flags.FLAGS.test_tmpdir + "/10000"
          )
          tf.io.gfile.makedirs(run_config.model_dir)
          # Best three trials checkpoint are generated. If the generator chooses
          # the suboptimal (wrong) trials, the test will fail.
          self._create_checkpoint(["search_generator"], 3)
          self._create_checkpoint(["search_generator"], 4)
          self._create_checkpoint(["search_generator"], 5)
          towers = generator.first_time_chief_generate(
              input_layer_fn=lambda: None,
              trial_mode=trial_utils.TrialMode.ENSEMBLE_SEARCH,
              logits_dimension=10,
              hparams={},
              run_config=run_config,
              is_training=True,
              trials=_create_trials(flags.FLAGS.test_tmpdir),
          )
          for t in towers:
              t(tf.zeros([100, 32, 32, 3]), training=False)
          self.assertLen(towers, 2)
          all_nodes = [
              node.name
              for node in tf.compat.v1.get_default_graph()
              .as_graph_def()
              .node
          ]
          self.assertAllInSet(_NONADAPTIVE_GRAPH_NODES, all_nodes)
  
imports: import collections
  import os
  from absl import flags
  from absl.testing import parameterized
  from model_search import hparam
  from model_search.architecture import architecture_utils
  from model_search.generators import prior_generator
  from model_search.generators import trial_utils
  from model_search.metadata import ml_metadata_db
  from model_search.metadata import trial
  from model_search.proto import ensembling_spec_pb2
  from model_search.proto import phoenix_spec_pb2
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 3 for calling the PriorGeneratorTest obj's underlying member method code with example usage: obj.test_nonadaptive_prior_graph() without return types