class_docstr: Population class
      
class_docstr_tok: ["Population","class"]
code: def append(self, individual, fitness):
      if self.opt_mode == "minimize":
          fitness = -1 * fitness
  
      self.population.insert(0, individual)
      self.fitness.insert(0, fitness)
  
      i = 0
      while (
          i < len(self.fitness) - 1
          and self.fitness[i] < self.fitness[i + 1]
      ):
          self.fitness[i], self.fitness[i + 1] = (
              self.fitness[i + 1],
              self.fitness[i],
          )
          self.population[i], self.population[i + 1] = (
              self.population[i + 1],
              self.population[i],
          )
          i += 1
  
imports: import math
  import logging
  import copy
  import random
  import numpy
  from itertools import permutations, combinations
  import nni
  from nni.tuner import Tuner
label_desc: Use image node_id 2 for calling the Population obj's underlying member method code with example usage: obj.append(individual, fitness) without return types