code: def test_catboost_pruning_callback_call() -> None:
      # The pruner is deactivated.
      study = optuna.create_study(pruner=DeterministicPruner(False))
      trial = study.ask()
      pruning_callback = CatBoostPruningCallback(trial, "Logloss")
      info = types.SimpleNamespace(
          iteration=1,
          metrics={
              "learn": {"Logloss": [1.0]},
              "validation": {"Logloss": [1.0]},
          },
      )
      assert pruning_callback.after_iteration(info)
  
      # The pruner is activated.
      study = optuna.create_study(pruner=DeterministicPruner(True))
      trial = study.ask()
      pruning_callback = CatBoostPruningCallback(trial, "Logloss")
      info = types.SimpleNamespace(
          iteration=1,
          metrics={
              "learn": {"Logloss": [1.0]},
              "validation": {"Logloss": [1.0]},
          },
      )
      assert not pruning_callback.after_iteration(info)
  
file_path: optuna/tests/integration_tests/test_catboost.py
imports: import types
  import numpy
  import pytest
  import optuna
  from optuna._imports import try_import
  from optuna.integration.catboost import CatBoostPruningCallback
  from optuna.testing.pruners import DeterministicPruner
label_desc: Use image node_id 1 for calling a global function with example usage: test_catboost_pruning_callback_call() without return types