code: def _get_pareto_front_trials_nd(
      trials: Sequence[FrozenTrial],
      directions: Sequence[StudyDirection],
  ) -> List[FrozenTrial]:
      pareto_front = []
      trials = [t for t in trials if t.state == TrialState.COMPLETE]
  
      # TODO(vincent): Optimize (use the fast non dominated sort defined in the NSGA-II paper).
      for trial in trials:
          dominated = False
          for other in trials:
              if _dominates(other, trial, directions):
                  dominated = True
                  break
  
          if not dominated:
              pareto_front.append(trial)
  
      return pareto_front
  
file_path: optuna/optuna/study/_multi_objective.py
imports: from typing import List
  from typing import Optional
  from typing import Sequence
  import optuna
  from optuna.study._study_direction import StudyDirection
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
label_desc: Use image node_id 2 for calling a global function with example usage: _get_pareto_front_trials_nd(trials, directions) and returns: pareto_front