code: def test_generator_with_dropouts(self):
      # Force graph mode
      with tf.compat.v1.Graph().as_default():
          spec = phoenix_spec_pb2.PhoenixSpec(
              problem_type=phoenix_spec_pb2.PhoenixSpec.DNN
          )
          spec.search_type = (
              phoenix_spec_pb2.PhoenixSpec.NONADAPTIVE_RANDOM_SEARCH
          )
          spec.is_input_shared = True
          generator = (
              search_candidate_generator.SearchCandidateGenerator(
                  phoenix_spec=spec,
                  metadata=ml_metadata_db.MLMetaData(
                      phoenix_spec=spec, study_name="", study_owner=""
                  ),
              )
          )
          input_tensor = tf.zeros([20, 32, 32, 3])
          fake_config = collections.namedtuple(
              "RunConfig", ["model_dir", "is_chief"]
          )
          run_config = fake_config(
              model_dir=flags.FLAGS.test_tmpdir + "/1", is_chief=True
          )
          towers = generator.generate(
              input_layer_fn=lambda: None,
              trial_mode=trial_utils.TrialMode.NO_PRIOR,
              logits_dimension=10,
              hparams=hp.HParams(
                  initial_architecture=["CONVOLUTION_3X3"],
                  dropout_rate=0.3,
              ),
              run_config=run_config,
              is_training=True,
              trials=[],
          )
          for t in towers:
              t(input_tensor, training=True)
          all_nodes = [
              node.name
              for node in tf.compat.v1.get_default_graph()
              .as_graph_def()
              .node
          ]
          tf.compat.v1.logging.info(all_nodes)
          self.assertAllInSet(_DROPOUT_GRAPH_NODE, all_nodes)
  
imports: import collections
  import os
  from absl import flags
  from model_search import hparam
  from model_search.architecture import architecture_utils
  from model_search.generators import search_candidate_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 distillation_spec_pb2
  from model_search.proto import ensembling_spec_pb2
  from model_search.proto import phoenix_spec_pb2
  from model_search.proto import transfer_learning_spec_pb2
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 4 for calling the SearchCandidateGeneratorTest obj's underlying member method code with example usage: obj.test_generator_with_dropouts() without return types