code: def _filter_study(study: "Study", trial: "FrozenTrial") -> "Study":
      if isinstance(study.pruner, HyperbandPruner):
          # Create `_BracketStudy` to use trials that have the same bracket id.
          pruner: HyperbandPruner = study.pruner
          return pruner._create_bracket_study(
              study, pruner._get_bracket_id(study, trial)
          )
      else:
          return study
  
file_path: optuna/optuna/pruners/__init__.py
imports: from typing import TYPE_CHECKING
  from optuna.pruners._base import BasePruner
  from optuna.pruners._hyperband import HyperbandPruner
  from optuna.pruners._median import MedianPruner
  from optuna.pruners._nop import NopPruner
  from optuna.pruners._patient import PatientPruner
  from optuna.pruners._percentile import PercentilePruner
  from optuna.pruners._successive_halving import SuccessiveHalvingPruner
  from optuna.pruners._threshold import ThresholdPruner
label_desc: Use image node_id 1 for calling a global function with example usage: _filter_study(study, trial) and returns: pruner, study