code: def plot_importance_per_top_groups(ebm, X):
      """Plots a plotly graph where the x-axis represents groups of top K terms and the y-axis their importances.
  
      The first group is the terms with the highest individual importance (i.e. top term), the second group is
      composed by the top 2 terms, and so on. For example:
          Group 1 - ['Age']
          Group 2 - ['Age', 'MaritalStatus']
          Group 3 - ['Age', 'MaritalStatus', 'CapitalGain']
          ...
          Group N - All terms
  
      Args:
          ebm: A fitted EBM
          X (numpy array): Samples used to compute the group importance
      """
      df = get_importance_per_top_groups(ebm, X)
  
      fig = px.line(
          df, x="groups", y="importances", title="Group Importances"
      )
      fig.show()
  
file_path: interpret/python/interpret-core/interpret/glassbox/_ebm/_research/_group_importance.py
imports: import numpy
  import pandas
  import plotly.express
  from sklearn.utils.validation import check_is_fitted
label_desc: Use image node_id 7 for calling a global function with example usage: plot_importance_per_top_groups(ebm, X) without return types