code: def plot_feature_importance_by_metric_plotly(
      model: ModelBridge,
  ) -> go.Figure:
      """One plot per feature, showing importances by metric."""
      importances = []
      for metric_name in sorted(model.metric_names):
          try:
              vals: Dict[str, Any] = model.feature_importances(
                  metric_name
              )
              vals["index"] = metric_name
              importances.append(vals)
          except NotImplementedError:
              logger.warning(
                  f"Model for {metric_name} does not support feature importances."
              )
      if not importances:
          raise NotImplementedError(
              "Feature importances could not be calculated for any metric"
          )
      df = pd.DataFrame(importances)
  
      # plot_feature_importance expects index in first column
      df = df.reindex(
          columns=(["index"] + [a for a in df.columns if a != "index"])
      )
  
      plot_fi = plot_feature_importance_plotly(
          df, "Absolute Parameter Importances by Metric"
      )
      num_subplots = len(df.columns)
      num_features = len(df)
      # Include per-subplot margin for subplot titles (feature names).
      plot_fi["layout"]["height"] = (
          num_subplots * (num_features + 1) * 50
      )
      return plot_fi
  
file_path: Ax/ax/plot/feature_importances.py
imports: from logging import Logger
  from typing import Any, Dict, Optional, Union
  import numpy
  import pandas
  import plotly.graph_objs
  from ax.exceptions.core import NoDataError
  from ax.modelbridge import ModelBridge
  from ax.plot.base import AxPlotConfig, AxPlotTypes
  from ax.plot.helper import compose_annotation
  from ax.utils.common.logger import get_logger
  from plotly import subplots
label_desc: Use image node_id 3 for calling a global function with example usage: plot_feature_importance_by_metric_plotly(model) and returns: plot_fi