code: def _get_group_name(term_list, ebm_term_names):
      """Returns the group's name in the format "term_name_1, term_name_2, ..."
  
      Args:
          term_list: A list of term names or indices
          ebm_term_names: a list of all ebm term names
  
      Returns:
          str: The group name
      """
      name = ""
      for term in term_list:
          if isinstance(term, str) and term in ebm_term_names:
              name += term if len(name) == 0 else ", " + term
          elif isinstance(term, int) and 0 <= term < len(
              ebm_term_names
          ):
              name += (
                  ebm_term_names[term]
                  if len(name) == 0
                  else ", " + ebm_term_names[term]
              )
          else:
              raise ValueError(
                  f"Term '{term}' is not a string or a valid integer."
              )
      return name
  
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 2 for calling a global function with example usage: _get_group_name(term_list, ebm_term_names) and returns: name