code: def global_feature_impact_graph(self, df, classification=False):
      if classification == True:
          feature_impact = go.Figure()
          for class_name, group in df.groupby("class_name"):
              feature_impact.add_trace(
                  go.Bar(
                      x=group["VariableName"],
                      y=group["Impact_Value"],
                      name=class_name,
                      hovertemplate="Feature: %{x} <br> Impact: %{y:.4f}<extra></extra>",
                  )
              )
              feature_impact.update_layout(
                  margin={"t": 0},
                  template="plotly_white",
                  autosize=True,
                  yaxis=dict(title_text="Impact on Model Output"),
                  font=dict(size=10),
                  legend=dict(
                      orientation="h",
                      yanchor="bottom",
                      y=1.02,
                      xanchor="right",
                      x=1,
                  ),
                  legend_title_text="Class",
              )
              feature_impact.update_xaxes(
                  showgrid=False, automargin=True
              )
              feature_impact.update_yaxes(
                  showgrid=True, automargin=True
              )
          return feature_impact
      else:
          signs_ = ["+" if i > 0 else "-" for i in df["Impact_Value"]]
          colors_ = [
              "rgba(41, 128, 185,1.0)"
              if i > 0
              else "rgba(192, 57, 43,1.0)"
              for i in df["Impact_Value"]
          ]
          feature_impact = go.Figure()
          feature_impact.add_trace(
              go.Bar(
                  y=list(df["Impact_Value"]),
                  x=list(df["VariableName"]),
                  name="features_impact",
                  text=signs_,
                  texttemplate="%{y:.2f} ",
                  textposition="outside",
                  cliponaxis=False,
                  orientation="v",
                  hovertemplate="Feature: %{y} <br> Impact: %{y:.4f}<extra></extra>",
                  marker=dict(
                      color=colors_,
                      line=dict(color="rgba(0, 0, 0, 0.5)", width=0),
                  ),
              )
          )
          feature_impact.update_layout(
              {"yaxis": {"title": "Impact on Model Output"}}
          )
          return feature_impact
  
file_path: explainx/lib/plotly_graphs.py
imports: from imports import *
  from feature_impact import *
  from feature_importance import *
  from shap_pdp import *
  from summary_plot import *
  from data_for_shap_graphs import *
label_desc: Use image node_id 9 for calling the plotly_graphs obj's underlying member method code with example usage: obj.global_feature_impact_graph(df, classification) and returns: feature_impact, feature_impact