class_docstr: RegularizedEvolutionTuner is tuner using Evolution NAS Tuner.
  See ``Regularized Evolution for Image Classifier Architecture Search`` for details.
  
  Parameters
  ---
  optimize_mode: str
      whether to maximize metric or not. default: 'maximize'
  population_size: int
      the maximum number of kept models
  sample_size: int
      the number of models chosen from population each time when evolution
docstr: This function will returns a dict of trial (hyper-)parameters, as a serializable object.
  
  Parameters
  ---
  parameter_id: int
      the index of current set of parameters
docstr_tok: ["This","function","will","returns","a","dict","of","trial","(","hyper-",")","parameters",",","as","a","serializable","object",".","Parameters","--","-","parameter_id",":","int","the","index","of","current","set","of","parameters"]
code: def generate_parameters(self, parameter_id, **kwargs):
      """
      This function will returns a dict of trial (hyper-)parameters, as a serializable object.
  
      Parameters
      ---
      parameter_id: int
          the index of current set of parameters
      """
      if self.initial_population:
          arch = self.initial_population.popleft()
          self.history[parameter_id] = arch
          self._from_initial[parameter_id] = True
          return arch
      elif self.population:
          sample = []
          while len(sample) < self.sample_size:
              sample.append(random.choice(list(self.population)))
  
          candidate = max(sample, key=lambda x: x.result)
          arch = self._mutate_model(candidate)
          self.history[parameter_id] = arch
          self._from_initial[parameter_id] = False
          return arch
      else:
          raise nni.NoMoreTrialError
  
imports: import copy
  import logging
  import random
  from collections import deque
  from schema import Schema, Optional
  import nni
  from nni.tuner import Tuner
  from nni import ClassArgsValidator
  from nni.utils import OptimizeMode, extract_scalar_reward
label_desc: Use image node_id 2 for calling the RegularizedEvolutionTuner obj's underlying member method code with example usage: obj.generate_parameters(parameter_id) and returns: arch, arch