code: def test_get_importance_per_top_groups():
      data = synthetic_regression()
      X = data["full"]["X"]
      y = data["full"]["y"]
  
      ebm = ExplainableBoostingRegressor()
      ebm.fit(X, y)
  
      df = get_importance_per_top_groups(ebm, X)
      dict = get_individual_importances(ebm, X)
  
      assert df.shape[0] == len(ebm.term_features_)
      # First group
      assert list(dict.keys())[0] in df["terms_per_group"][0]
      # Second group
      assert list(dict.keys())[0] in df["terms_per_group"][1]
      assert list(dict.keys())[1] in df["terms_per_group"][1]
  
file_path: interpret/python/interpret-core/tests/glassbox/ebm/research/test_group_importance.py
imports: import pytest
  import warnings
  from sklearn.exceptions import NotFittedError
  from interpret.glassbox import ExplainableBoostingRegressor, ExplainableBoostingClassifier
  from ....tutils import synthetic_multiclass, synthetic_classification, synthetic_regression
  from interpret.glassbox._ebm._research._group_importance import _get_group_name
  from interpret.glassbox._ebm._research import compute_group_importance, append_group_importance, get_group_and_individual_importances, get_individual_importances, get_importance_per_top_groups
label_desc: Use image node_id 7 for calling a global function with example usage: test_get_importance_per_top_groups() without return types