class_docstr: Population class
      
class_docstr_tok: ["Population","class"]
code: def generate(self):
      if not self.fitness and not self.population:
          return [Configuration(self.search_space)]
      elif not self.fitness and self.population:
          return []
      else:
          self.fitness.pop(0)
          config = self.queue.pop(0)
  
          action_space = config.get_actions()
          num = len(action_space)
          if num > self.num_samples:
              indices = random.sample(range(num), self.num_samples)
          else:
              indices = range(num)
  
          res = []
          for idx in indices:
              tmp = config.step(action_space[idx])
              if tmp not in self.population:
                  res.append(tmp)
  
          return res
  
imports: import math
  import random
  import logging
  import copy
  import nni
  from nni.tuner import Tuner
label_desc: Use image node_id 3 for calling the Population obj's underlying member method code with example usage: obj.generate() and returns: list, list, res