code: def test_get_improvement_info(
      get_error: bool,
      improvement_evaluator_class: Callable[
          [], BaseImprovementEvaluator | None
      ],
      error_evaluator_class: Callable[[], BaseErrorEvaluator | None],
  ) -> None:
      study = _prepare_study_with_cross_validation_scores()
  
      info = _get_improvement_info(
          study,
          get_error,
          improvement_evaluator_class(),
          error_evaluator_class(),
      )
      assert info.trial_numbers == [0, 1, 2]
      assert len(info.improvements) == 3
      if get_error:
          assert info.errors is not None
          assert len(info.errors) == 3
          assert info.errors[0] == info.errors[1] == info.errors[2]
      else:
          assert info.errors is None
  
imports: from __future__ import annotations
  from io import BytesIO
  from typing import Any
  from typing import Callable
  import pytest
  from optuna.distributions import FloatDistribution
  from optuna.study import create_study
  from optuna.study import Study
  from optuna.terminator import BaseErrorEvaluator
  from optuna.terminator import BaseImprovementEvaluator
  from optuna.terminator import CrossValidationErrorEvaluator
  from optuna.terminator import RegretBoundEvaluator
  from optuna.terminator import report_cross_validation_scores
  from optuna.terminator import StaticErrorEvaluator
  from optuna.testing.objectives import fail_objective
  from optuna.testing.visualization import prepare_study_with_trials
  from optuna.trial import create_trial
  from optuna.trial import TrialState
  from optuna.visualization import plot_terminator_improvement
  from optuna.visualization._terminator_improvement import _get_improvement_info
  from optuna.visualization._terminator_improvement import _get_y_range
  from optuna.visualization._terminator_improvement import _ImprovementInfo
label_desc: Use image node_id 6 for calling a global function with example usage: test_get_improvement_info(get_error, improvement_evaluator_class, error_evaluator_class) without return types