code: def _normalize_value(
      value: Optional[float], direction: StudyDirection
  ) -> float:
      if value is None:
          value = float("inf")
  
      if direction is StudyDirection.MAXIMIZE:
          value = -value
  
      return value
  
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 6 for calling a global function with example usage: _normalize_value(value, direction) and returns: value