code: def _get_importances_plot(
      infos: tuple[_ImportancesInfo, ...], study: Study
  ) -> "go.Figure":
      layout = go.Layout(
          title="Hyperparameter Importances",
          xaxis={"title": "Hyperparameter Importance"},
          yaxis={"title": "Hyperparameter"},
      )
  
      data: list[go.Bar] = []
      for info in infos:
          if not info.importance_values:
              continue
  
          data.append(
              go.Bar(
                  x=info.importance_values,
                  y=info.param_names,
                  name=info.target_name,
                  text=info.importance_labels,
                  textposition="outside",
                  cliponaxis=False,  # Ensure text is not clipped.
                  hovertemplate=_get_hover_template(info, study),
                  orientation="h",
              )
          )
  
      return go.Figure(data, layout)
  
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 4 for calling a global function with example usage: _get_importances_plot(infos, study) and returns: go