code: def _update_pop(self, pop_size):
          
          candidates = []
          for ind in self.population:
              candidates.append(self._crossover(ind))
          self._model_count += len(candidates)
          self.assign_fitnesses(candidates)
          for i in range(len(self.population)):
              if candidates[i].fitness > self.population[i].fitness:
                  self.population[i] = candidates[i]
          return
docs: Updates population according to crossover and fitness criteria.