docstr: Select elite population from the given trials by NSGA-III algorithm.
  
  Args:
      study:
          Target study object.
      population:
          Trials in the study.
  
  Returns:
      A list of trials that are selected as elite population.
docstr_tok: ["Select","elite","population","from","the","given","trials","by","NSGA-III","algorithm",".","Args",":","study",":","Target","study","object",".","population",":","Trials","in","the","study",".","Returns",":","A","list","of","trials","that","are","selected","as","elite","population","."]
code: def __call__(
      self, study: Study, population: list[FrozenTrial]
  ) -> list[FrozenTrial]:
      """Select elite population from the given trials by NSGA-III algorithm.
  
      Args:
          study:
              Target study object.
          population:
              Trials in the study.
  
      Returns:
          A list of trials that are selected as elite population.
      """
      _validate_constraints(population, self._constraints_func)
  
      dominates = (
          _dominates
          if self._constraints_func is None
          else _constrained_dominates
      )
      population_per_rank = _fast_non_dominated_sort(
          population, study.directions, dominates
      )
      elite_population: list[FrozenTrial] = []
      for population in population_per_rank:
          if (
              len(elite_population) + len(population)
              < self._population_size
          ):
              elite_population.extend(population)
          else:
              n_objectives = len(study.directions)
              # Construct reference points in the first run.
              if self._reference_points is None:
                  self._reference_points = (
                      _generate_default_reference_point(
                          n_objectives, self._dividing_parameter
                      )
                  )
              elif np.shape(self._reference_points)[1] != n_objectives:
                  raise ValueError(
                      "The dimension of reference points vectors must be the same as the number "
                      "of objectives of the study."
                  )
  
              # Normalize objective values after filtering +-inf.
              objective_matrix = _normalize_objective_values(
                  _filter_inf(elite_population + population)
              )
              (
                  closest_reference_points,
                  distance_reference_points,
              ) = _associate_individuals_with_reference_points(
                  objective_matrix, self._reference_points
              )
  
              elite_population_num = len(elite_population)
              target_population_size = (
                  self._population_size - elite_population_num
              )
              additional_elite_population = _preserve_niche_individuals(
                  target_population_size,
                  elite_population_num,
                  population,
                  closest_reference_points,
                  distance_reference_points,
                  self._rng.rng,
              )
              elite_population.extend(additional_elite_population)
              break
      return elite_population
  
imports: from __future__ import annotations
  from collections import defaultdict
  from collections.abc import Callable
  from collections.abc import Sequence
  import itertools
  import math
  import numpy
  from optuna.samplers._lazy_random_state import LazyRandomState
  from optuna.samplers.nsgaii._dominates import _constrained_dominates
  from optuna.samplers.nsgaii._dominates import _validate_constraints
  from optuna.samplers.nsgaii._elite_population_selection_strategy import _fast_non_dominated_sort
  from optuna.study import Study
  from optuna.study._multi_objective import _dominates
  from optuna.trial import FrozenTrial
label_desc: Use image node_id 2 for calling the NSGAIIIElitePopulationSelectionStrategy obj's underlying member method code with example usage: obj.__call__(study, population) and returns: elite_population