code: def _get_importances_info(
      study: Study,
      evaluator: BaseImportanceEvaluator | None,
      params: list[str] | None,
      target: Callable[[FrozenTrial], float] | None,
      target_name: str,
  ) -> _ImportancesInfo:
      _check_plot_args(study, target, target_name)
  
      trials = _filter_nonfinite(
          study.get_trials(
              deepcopy=False, states=(TrialState.COMPLETE,)
          ),
          target=target,
      )
  
      if len(trials) == 0:
          logger.warning(
              "Study instance does not contain completed trials."
          )
          return _ImportancesInfo(
              importance_values=[],
              param_names=[],
              importance_labels=[],
              target_name=target_name,
          )
  
      importances = optuna.importance.get_param_importances(
          study, evaluator=evaluator, params=params, target=target
      )
  
      importances = dict(reversed(list(importances.items())))
      importance_values = list(importances.values())
      param_names = list(importances.keys())
      importance_labels = [
          f"{val:.2f}" if val >= 0.01 else "<0.01"
          for val in importance_values
      ]
  
      return _ImportancesInfo(
          importance_values=importance_values,
          param_names=param_names,
          importance_labels=importance_labels,
          target_name=target_name,
      )
  
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 1 for calling a global function with example usage: _get_importances_info(study, evaluator, params, target, target_name) and returns: _ImportancesInfo, _ImportancesInfo