code: def test_get_suggestion(
      self,
      get_architecture,
      randint,
      completed_trials,
      initial_architecture,
      expected_architecture,
      replicate_cell,
  ):
      get_architecture.return_value = initial_architecture
      randint.return_value = 2
  
      hparams = hp.HParams(
          new_block_type="FIXED_CHANNEL_CONVOLUTION_16"
      )  # id=1.
      # Use problem_type=DNN so we don't have to worry about the final
      # architecture being correct.
      spec = phoenix_spec_pb2.PhoenixSpec(
          problem_type=phoenix_spec_pb2.PhoenixSpec.DNN,
          maximum_depth=11,
          num_blocks_in_cell=4,
          reduction_block_type="AVERAGE_POOL_2X2",
          replicate_cell=replicate_cell,
          blocks_to_use=[
              "FIXED_OUTPUT_FULLY_CONNECTED_128",
              "FIXED_OUTPUT_FULLY_CONNECTED_256",
              "FIXED_OUTPUT_FULLY_CONNECTED_512",
          ],
          beam_size=3,
      )
      algorithm = constrained_descent.ConstrainedDescent(
          spec, self._metadata
      )
      trials = []
      for i in range(completed_trials):
          trials.append(
              trial_module.Trial(
                  {
                      "id": i,
                      "model_dir": "/tmp/" + str(i),
                      "status": "COMPLETED",
                      "trial_infeasible": False,
                      "final_measurement": {"objective_value": 100 - i},
                  }
              )
          )
  
      actual_architecture, fork_trial = algorithm.get_suggestion(
          trials, hparams
      )
  
      # We use a beam of size 3 and always choose the last trial to be the best.
      self.assertEqual(fork_trial, completed_trials - 3)
      self.assertTrue(
          search_test_utils.is_mutation_or_equal(
              actual_architecture[:4], expected_architecture[:4]
          )
      )
  
file_path: model_search/model_search/search/constrained_descent_test.py
imports: from absl.testing import parameterized
  import mock
  from model_search import hparam
  from model_search.metadata import ml_metadata_db
  from model_search.metadata import trial
  from model_search.proto import phoenix_spec_pb2
  from model_search.search import constrained_descent
  from model_search.search import test_utils
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the ConstrainedDescentTest obj's underlying member method code with example usage: obj.test_get_suggestion(get_architecture, randint, completed_trials, initial_architecture, expected_architecture, replicate_cell) without return types