code: def _get_importances_infos(
      study: Study,
      evaluator: BaseImportanceEvaluator | None,
      params: list[str] | None,
      target: Callable[[FrozenTrial], float] | None,
      target_name: str,
  ) -> tuple[_ImportancesInfo, ...]:
      metric_names = study.metric_names
      if target or not study._is_multi_objective():
          target_name = (
              metric_names[0]
              if metric_names is not None and not target
              else target_name
          )
          importances_infos: tuple[_ImportancesInfo, ...] = (
              _get_importances_info(
                  study,
                  evaluator,
                  params,
                  target=target,
                  target_name=target_name,
              ),
          )
  
      else:
          n_objectives = len(study.directions)
          target_names = (
              metric_names
              if metric_names is not None
              else (
                  f"{target_name} {objective_id}"
                  for objective_id in range(n_objectives)
              )
          )
  
          importances_infos = tuple(
              _get_importances_info(
                  study,
                  evaluator,
                  params,
                  target=lambda t: t.values[objective_id],
                  target_name=target_name,
              )
              for objective_id, target_name in enumerate(target_names)
          )
  
      return importances_infos
  
imports: from __future__ import annotations
  from typing import Callable
  from typing import NamedTuple
  import optuna
  from optuna.distributions import BaseDistribution
  from optuna.importance._base import BaseImportanceEvaluator
  from optuna.logging import get_logger
  from optuna.study import Study
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
  from optuna.visualization._plotly_imports import _imports
  from optuna.visualization._utils import _check_plot_args
  from optuna.visualization._utils import _filter_nonfinite
label_desc: Use image node_id 2 for calling a global function with example usage: _get_importances_infos(study, evaluator, params, target, target_name) and returns: importances_infos