code: def global_feature_importance_graph(self, df, classification=False):
      if classification == True:
          feature_importance = go.Figure()
          # for class_name, group in df.groupby("class_name"):
          feature_importance.add_trace(
              go.Bar(
                  x=list(df["VariableName"]),
                  y=list(df["Impact_Value"]),
                  # name=df["class_name"],
                  hovertemplate="Feature: %{x} <br> Impact: %{y:.4f}<extra></extra>",
              )
          )
  
          feature_importance.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_importance.update_xaxes(
              showgrid=False, automargin=True
          )
          feature_importance.update_yaxes(
              showgrid=True, automargin=True
          )
          return feature_importance
  
      else:
          feature_impact = go.Figure()
          feature_impact.add_trace(
              go.Bar(
                  y=list(df["Impact_Value"]),
                  x=list(df["VariableName"]),
                  name="features_impact",
                  texttemplate="%{y:.2f} ",
                  textposition="auto",
                  cliponaxis=False,
                  orientation="v",
                  hovertemplate="Feature: %{y} <br> Impact: %{y:.4f}<extra></extra>",
                  marker=dict(
                      line=dict(color="rgba(0, 0, 0, 0.5)", width=0)
                  ),
              )
          )
          feature_impact.update_layout(
              {"yaxis": {"title": "Average 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 10 for calling the plotly_graphs obj's underlying member method code with example usage: obj.global_feature_importance_graph(df, classification) and returns: feature_importance, feature_impact