code: def _add_diversity_score(self, scores, predictions):
      n_models = predictions.shape[1]
  
      cor = self._corr_func(predictions)
      assert cor.shape == (n_models, n_models)
      np.fill_diagonal(cor, 0)
  
      final_scores = scores.copy()
      diversity = np.apply_along_axis(
          lambda x: (n_models - np.sum(x >= self.min_correlation))
          / n_models,
          0,
          cor,
      )
  
      final_scores += diversity
      return final_scores
  
imports: import numbers
  from joblib import Parallel, delayed
  import numpy
  from scipy.stats import kendalltau, rankdata, spearmanr
  from sklearn.base import BaseEstimator, clone
  from sklearn.model_selection import check_cv
  from sklearn.utils._param_validation import Interval, StrOptions
  from .base import _fit_and_score
  from .stacking import Stacking
label_desc: Use image node_id 9 for calling the BaseEnsembleSelection obj's underlying member method code with example usage: obj._add_diversity_score(scores, predictions) and returns: final_scores