code: def plotly_classification_plot(
      classification_df: pd.DataFrame,
      round: int = 2,
      percentage: bool = False,
  ):
      """Displays bar plots showing label distributions above and below cutoff
      value.
  
      Args:
          classification_df (pd.DataFrame): generated with explainer.get_classification_df()
          round (int, optional): round float by round number of digits. Defaults to 2.
          percentage (bool, optional): Display percentage instead of absolute
              numbers. Defaults to False.
  
      Returns:
          Plotly fig
      """
  
      x = ["below cutoff", "above cutoff", "total"]
  
      fig = go.Figure()
      col_sums = classification_df.sum(axis=0)
  
      for label, below, above, total in classification_df.itertuples():
          below_perc = 100 * below / col_sums["below"]
          above_perc = 100 * above / col_sums["above"]
          total_perc = 100 * total / col_sums["total"]
          if percentage:
              fig.add_trace(
                  go.Bar(
                      x=x,
                      y=[below_perc, above_perc, total_perc],
                      text=[
                          f"<b>{below}</b> ({below_perc:.{round}f}%)",
                          f"<b>{above}</b> ({above_perc:.{round}f}%)",
                          f"<b>{total}</b> ({total_perc:.{round}f}%)",
                      ],
                      textposition="auto",
                      hoverinfo="text",
                      name=label,
                  )
              )
          else:
              fig.add_trace(
                  go.Bar(
                      x=x,
                      y=[below, above, total],
                      text=[
                          f"<b>{below}</b> ({below_perc:.{round}f}%)",
                          f"<b>{above}</b> ({above_perc:.{round}f}%)",
                          f"<b>{total}</b> ({total_perc:.{round}f}%)",
                      ],
                      textposition="auto",
                      hoverinfo="text",
                      name=label,
                  )
              )
      if percentage:
          fig.update_layout(title="Percentage above and below cutoff")
      else:
          fig.update_layout(title="Total above and below cutoff")
  
      fig.update_layout(
          barmode="stack", margin=dict(t=40, b=40, l=40, r=40)
      )
  
      fig.update_layout(
          legend=dict(orientation="h", xanchor="center", y=-0.2, x=0.5)
      )
      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 4 for calling a global function with example usage: plotly_classification_plot(classification_df, round, percentage) and returns: fig