code: def test_25_percentile_pruner_intermediate_values(
      direction_value: Tuple[str, List[float], float]
  ) -> None:
      direction, intermediate_values, latest_value = direction_value
      pruner = optuna.pruners.PercentilePruner(25.0, 0, 0)
      study = optuna.study.create_study(
          direction=direction, pruner=pruner
      )
  
      for v in intermediate_values:
          trial = study.ask()
          trial.report(v, 1)
          study.tell(trial, v)
  
      trial = study.ask()
      # A pruner is not activated if a trial has no intermediate values.
      assert not trial.should_prune()
  
      trial.report(latest_value, 1)
      # A pruner is activated if a trial has an intermediate value.
      assert trial.should_prune()
  
file_path: optuna/tests/pruners_tests/test_percentile.py
imports: import math
  from typing import List
  from typing import Tuple
  import warnings
  import pytest
  import optuna
  from optuna.pruners import _percentile
  from optuna.study import Study
  from optuna.study import StudyDirection
  from optuna.trial import TrialState
label_desc: Use image node_id 6 for calling a global function with example usage: test_25_percentile_pruner_intermediate_values(direction_value) without return types