code: def test_patient_pruner_intermediate_values_nan() -> None:
      pruner = optuna.pruners.PatientPruner(None, 0, 0)
      study = optuna.study.create_study(pruner=pruner)
  
      trial = study.ask()
  
      # A pruner is not activated if a trial does not have any intermediate values.
      assert not trial.should_prune()
  
      trial.report(float("nan"), 0)
      # A pruner is not activated if a trial has only one intermediate value.
      assert not trial.should_prune()
  
      trial.report(1.0, 1)
      # A pruner is not activated if a trial has only nan in intermediate values.
      assert not trial.should_prune()
  
      trial.report(float("nan"), 2)
      # A pruner is not activated if a trial has only nan in intermediate values.
      assert not trial.should_prune()
  
file_path: optuna/tests/pruners_tests/test_patient.py
imports: from typing import List
  import pytest
  import optuna
label_desc: Use image node_id 5 for calling a global function with example usage: test_patient_pruner_intermediate_values_nan() without return types