code: def test_median_pruner_n_startup_trials() -> None:
      pruner = optuna.pruners.MedianPruner(2, 0)
      study = optuna.study.create_study(pruner=pruner)
  
      trial = study.ask()
      trial.report(1, 1)
      study.tell(trial, 1)
  
      trial = study.ask()
      trial.report(2, 1)
      # A pruner is not activated during startup trials.
      assert not trial.should_prune()
      study.tell(trial, 2)
  
      trial = study.ask()
      trial.report(3, 1)
      # A pruner is activated after startup trials.
      assert trial.should_prune()
  
file_path: optuna/tests/pruners_tests/test_median.py
imports: from typing import List
  from typing import Tuple
  import pytest
  import optuna
label_desc: Use image node_id 4 for calling a global function with example usage: test_median_pruner_n_startup_trials() without return types