code: def test_patient_pruner_intermediate_values(
      patience: int,
      min_delta: float,
      direction: str,
      intermediates: List[int],
      expected_prune_steps: List[int],
  ) -> None:
      pruner = optuna.pruners.PatientPruner(None, patience, min_delta)
      study = optuna.study.create_study(
          pruner=pruner, direction=direction
      )
  
      trial = study.ask()
  
      pruned = []
      for step, value in enumerate(intermediates):
          trial.report(value, step)
          if trial.should_prune():
              pruned.append(step)
      assert pruned == expected_prune_steps
  
file_path: optuna/tests/pruners_tests/test_patient.py
imports: from typing import List
  import pytest
  import optuna
label_desc: Use image node_id 6 for calling a global function with example usage: test_patient_pruner_intermediate_values(patience, min_delta, direction, intermediates, expected_prune_steps) without return types