code: def next_population(self, population, fitnesses):
          
          # Update probability vector
          self._probability_vec = _adjust_probability_vec_best(
              population, fitnesses, self._probability_vec, self._adjust_rate)
  
          # Mutate probability vector
          _mutate_probability_vec(self._probability_vec, self._mutation_chance,
                                  self._mutation_adjust_rate)
  
          # Return new samples
          return [
              _sample(self._probability_vec)
              for _ in range(self._population_size)
          ]
docs: Make a new population after each optimization iteration.
  
          Args:
              population: The population current population of solutions.
              fitnesses: The fitness associated with each solution in the population
          Returns:
              list; a list of solutions.