code: def _samme_proba(estimator, n_classes, X):
      """Calculate algorithm 4, step 2, equation c) of Zhu et al [1].
  
      References
      ----------
      .. [1] J. Zhu, H. Zou, S. Rosset, T. Hastie, "Multi-class AdaBoost", 2009.
  
      """
      proba = estimator.predict_proba(X)
  
      # Displace zero probabilities so the log is defined.
      # Also fix negative elements which may occur with
      # negative sample weights.
      np.clip(proba, np.finfo(proba.dtype).eps, None, out=proba)
      log_proba = np.log(proba)
  
      return (n_classes - 1) * (
          log_proba
          - (1.0 / n_classes) * log_proba.sum(axis=1)[:, np.newaxis]
      )
  
imports: import warnings
  from abc import ABCMeta, abstractmethod
  from numbers import Integral, Real
  import numpy
  from scipy.special import xlogy
  from ..base import ClassifierMixin, RegressorMixin, _fit_context, is_classifier, is_regressor
  from ..metrics import accuracy_score, r2_score
  from ..tree import DecisionTreeClassifier, DecisionTreeRegressor
  from ..utils import _safe_indexing, check_random_state
  from ..utils._param_validation import HasMethods, Interval, StrOptions
  from ..utils.extmath import softmax, stable_cumsum
  from ..utils.validation import _check_sample_weight, _num_samples, check_is_fitted, has_fit_parameter
  from ._base import BaseEnsemble
label_desc: Use image node_id 1 for calling a global function with example usage: _samme_proba(estimator, n_classes, X) and returns: unknown