code: def test_multi_objective_mean_decrease_impurity_importance_evaluator_with_infinite(
      target_idx: int, inf_value: float
  ) -> None:
      # The test ensures that trials with infinite values are ignored to calculate importance scores.
      n_trial = 10
      seed = 13
  
      # Importance scores are calculated without a trial with an inf value.
      study = create_study(
          directions=["minimize", "minimize"],
          sampler=RandomSampler(seed=seed),
      )
      study.optimize(multi_objective_function, n_trials=n_trial)
  
      evaluator = MeanDecreaseImpurityImportanceEvaluator(seed=seed)
      param_importance_without_inf = evaluator.evaluate(
          study, target=lambda t: t.values[target_idx]
      )
  
      # A trial with an inf value is added into the study manually.
      study.add_trial(
          create_trial(
              values=[inf_value, inf_value],
              params={"x1": 1.0, "x2": 1.0, "x3": 3.0},
              distributions={
                  "x1": FloatDistribution(low=0.1, high=3),
                  "x2": FloatDistribution(low=0.1, high=3, log=True),
                  "x3": FloatDistribution(low=2, high=4, log=True),
              },
          )
      )
      # Importance scores are calculated with a trial with an inf value.
      param_importance_with_inf = evaluator.evaluate(
          study, target=lambda t: t.values[target_idx]
      )
  
      # Obtained importance scores should be the same between with inf and without inf,
      # because the last trial whose objective value is an inf is ignored.
      assert param_importance_with_inf == param_importance_without_inf
  
file_path: optuna/tests/importance_tests/test_mean_decrease_impurity.py
imports: from typing import Tuple
  import pytest
  from optuna import create_study
  from optuna import Trial
  from optuna.distributions import FloatDistribution
  from optuna.importance import MeanDecreaseImpurityImportanceEvaluator
  from optuna.samplers import RandomSampler
  from optuna.trial import create_trial
label_desc: Use image node_id 6 for calling a global function with example usage: test_multi_objective_mean_decrease_impurity_importance_evaluator_with_infinite(target_idx, inf_value) without return types