code: def test_append_multiple_group_importances():
      data = synthetic_regression()
      X = data["full"]["X"]
      y = data["full"]["y"]
      term_names_1 = ["A", "B"]
      term_names_2 = ["C", "D"]
  
      ebm = ExplainableBoostingRegressor()
      ebm.fit(X, y)
  
      global_explanation = append_group_importance(term_names_1, ebm, X)
      global_explanation = append_group_importance(
          term_names_2, ebm, X, global_exp=global_explanation
      )
      assert (
          "A, B" in global_explanation._internal_obj["overall"]["names"]
      )
      assert (
          "C, D" in global_explanation._internal_obj["overall"]["names"]
      )
      assert (
          compute_group_importance(term_names_1, ebm, X)
          in global_explanation._internal_obj["overall"]["scores"]
      )
      assert (
          compute_group_importance(term_names_2, ebm, X)
          in global_explanation._internal_obj["overall"]["scores"]
      )
  
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 3 for calling a global function with example usage: test_append_multiple_group_importances() without return types