class_docstr: An `adanet.Generator` from a pool of `Estimator` and `Model` instances.
class_docstr_tok: ["An","`","adanet.Generator","`","from","a","pool","of","`","Estimator","`","and","`","Model","`","instances","."]
code: def generate_candidates(
      self,
      previous_ensemble,
      iteration_number,
      previous_ensemble_reports,
      all_reports,
      config,
  ):
      assert config
      builders = []
      candidate_pool = self._maybe_call_candidate_pool(
          config, iteration_number
      )
  
      if isinstance(candidate_pool, dict):
          for name in sorted(candidate_pool):
              builders.append(
                  _BuilderFromSubestimator(
                      name,
                      _convert_to_subestimator(candidate_pool[name]),
                      logits_fn=self._logits_fn,
                      last_layer_fn=self._last_layer_fn,
                      config=config,
                  )
              )
          return builders
  
      for i, estimator in enumerate(candidate_pool):
          name = "{class_name}{index}".format(
              class_name=estimator.__class__.__name__, index=i
          )
          builders.append(
              _BuilderFromSubestimator(
                  name,
                  _convert_to_subestimator(estimator),
                  logits_fn=self._logits_fn,
                  last_layer_fn=self._last_layer_fn,
                  config=config,
              )
          )
      return builders
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import inspect
  from adanet import subnetwork
  from adanet import tf_compat
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the _GeneratorFromCandidatePool obj's underlying member method code with example usage: obj.generate_candidates(previous_ensemble, iteration_number, previous_ensemble_reports, all_reports, config) and returns: builders, builders