code: def ebm_predict_scores(
      X,
      n_samples,
      feature_names_in,
      feature_types_in,
      bins,
      intercept,
      term_scores,
      term_features,
      init_score=None,
  ):
      shape = n_samples
      if not isinstance(intercept, float) and len(intercept) != 1:
          shape = (n_samples, len(intercept))
      sample_scores = np.full(shape, intercept, 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,
          ):
              sample_scores += term_scores[term_idx][tuple(bin_indexes)]
  
      if init_score is not None:
          sample_scores += init_score
  
      return sample_scores
  
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 2 for calling a global function with example usage: ebm_predict_scores(X, n_samples, feature_names_in, feature_types_in, bins, intercept, term_scores, term_features, init_score) and returns: sample_scores