code: def _create_spec(replay_towers=0, ensemble_type="none"):
      output = phoenix_spec_pb2.PhoenixSpec()
      output.search_type = (
          phoenix_spec_pb2.PhoenixSpec.NONADAPTIVE_RANDOM_SEARCH
      )
      if replay_towers:
          output.replay.CopyFrom(phoenix_spec_pb2.ArchitectureReplay())
          for _ in range(replay_towers):
              output.replay.towers.add()
  
      if ensemble_type == "adaptive":
          output.ensemble_spec.ensemble_search_type = (
              ensembling_spec_pb2.EnsemblingSpec.ADAPTIVE_ENSEMBLE_SEARCH
          )
      if ensemble_type == "nonadaptive":
          output.ensemble_spec.ensemble_search_type = (
              ensembling_spec_pb2.EnsemblingSpec.NONADAPTIVE_ENSEMBLE_SEARCH
          )
      if ensemble_type == "intermix":
          output.ensemble_spec.ensemble_search_type = (
              ensembling_spec_pb2.EnsemblingSpec.INTERMIXED_NONADAPTIVE_ENSEMBLE_SEARCH
          )
      return output
  
file_path: model_search/model_search/controller_test.py
imports: from absl import logging
  from absl.testing import absltest
  from absl.testing import parameterized
  from model_search import controller
  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
label_desc: Use image node_id 1 for calling a global function with example usage: _create_spec(replay_towers, ensemble_type) and returns: output