code: def ebm_eval_terms(
      X,
      n_samples,
      n_scores,
      feature_names_in,
      feature_types_in,
      bins,
      term_scores,
      term_features,
  ):
      if n_scores == 1:
          shape = (n_samples, len(term_features))
      else:
          shape = (n_samples, len(term_features), n_scores)
      explanations = np.empty(shape, dtype=np.float64)
  
      if 0 < n_samples:
          for term_idx, bin_indexes in eval_terms(
              X,
              n_samples,
              feature_names_in,
              feature_types_in,
              bins,
              term_features,
          ):
              explanations[:, term_idx] = term_scores[term_idx][
                  tuple(bin_indexes)
              ]
  
      return explanations
  
file_path: interpret/python/interpret-core/interpret/glassbox/_ebm/_bin.py
imports: import logging
  import numpy
  from ...utils._native import Native
  from ...utils._clean_x import unify_columns
label_desc: Use image node_id 3 for calling a global function with example usage: ebm_eval_terms(X, n_samples, n_scores, feature_names_in, feature_types_in, bins, term_scores, term_features) and returns: explanations