code: def plotly_importances_plot(
      importance_df,
      descriptions=None,
      round=3,
      target="target",
      units="",
      title=None,
      xaxis_title=None,
  ):
      """Return feature importance plot
  
      Args:
          importance_df (pd.DataFrame): generate with get_importance_df(...)
          descriptions (dict, optional): dict of descriptions of each feature.
          round (int, optional): Rounding to apply to floats. Defaults to 3.
          target (str, optional): Name of target variable. Defaults to "target".
          units (str, optional): Units of target variable. Defaults to "".
          title (str, optional): Title for graph. Defaults to None.
          xaxis_title (str, optional): Title for x-axis Defaults to None.
  
      Returns:
          Plotly fig
      """
  
      importance_name = importance_df.columns[
          1
      ]  # can be "MEAN_ABS_SHAP", "Permutation Importance", etc
      if title is None:
          title = importance_name
      longest_feature_name = importance_df["Feature"].str.len().max()
  
      imp = importance_df.sort_values(importance_name)
  
      feature_names = [
          str(len(imp) - i) + ". " + col
          for i, col in enumerate(
              imp.iloc[:, 0].astype(str).values.tolist()
          )
      ]
  
      importance_values = imp.iloc[:, 1]
  
      data = [
          go.Bar(
              y=feature_names,
              x=importance_values,
              # text=importance_values.round(round),
              text=descriptions[::-1]
              if descriptions is not None
              else None,  # don't know why, but order needs to be reversed
              # textposition='inside',
              # insidetextanchor='end',
              hoverinfo="text",
              orientation="h",
          )
      ]
  
      layout = go.Layout(
          title=title, plot_bgcolor="#fff", showlegend=False
      )
      fig = go.Figure(data=data, layout=layout)
      fig.update_yaxes(automargin=True)
      if xaxis_title is None:
          xaxis_title = units
      fig.update_xaxes(automargin=True, title=xaxis_title)
  
      left_margin = longest_feature_name * 7
      if np.isnan(left_margin):
          left_margin = 100
  
      fig.update_layout(
          height=200 + len(importance_df) * 20,
          margin=go.layout.Margin(
              l=left_margin, r=40, b=40, t=40, pad=4
          ),
      )
      return fig
  
imports: import warnings
  import numpy
  import pandas
  from pandas.api.types import is_numeric_dtype
  import plotly.graph_objs
  from plotly.subplots import make_subplots
  from sklearn.metrics import classification_report, confusion_matrix, precision_recall_curve, roc_curve, roc_auc_score, average_precision_score
  from .explainer_methods import matching_cols, safe_isinstance
label_desc: Use image node_id 10 for calling a global function with example usage: plotly_importances_plot(importance_df, descriptions, round, target, units, title, xaxis_title) and returns: fig