code: def decision_function(self, X):
          
          X = _check_2d_inp(X)
          preds = np.empty((X.shape[0], self.nclasses))
  
          available_methods = dir(self.classifiers[0])
          if "decision_function" in available_methods:
              Parallel(n_jobs=self.njobs, verbose=0, require="sharedmem")(delayed(self._decision_function_decision_function)(c, preds, X) for c in range(self.nclasses))
              apply_softmax = True
          elif "predict_proba" in available_methods:
              Parallel(n_jobs=self.njobs, verbose=0, require="sharedmem")(delayed(self._decision_function_predict_proba)(c, preds, X) for c in range(self.nclasses))
              apply_softmax = False
          elif "predict" in available_methods:
              Parallel(n_jobs=self.njobs, verbose=0, require="sharedmem")(delayed(self.decision_function_predict)(c, preds, X) for c in range(self.nclasses))
              apply_softmax = False
          else:
              raise ValueError("'base_classifier' must have at least one of 'decision_function', 'predict_proba', 'Predict'.")
  
          if apply_softmax:
              preds = np.exp(preds - preds.max(axis=1).reshape((-1, 1)))
              preds = preds / preds.sum(axis=1).reshape((-1, 1))
          return preds
docs: Calculate a 'goodness' distribution over labels
          
          Parameters
          ----------
          X : array (n_samples, n_features)
              Data for which to predict the cost of each label.
          
          Returns
          -------
          pred : array (n_samples, n_classes)
              A goodness score (more is better) for each label and observation.
              If passing apply_softmax=True, these are standardized to sum up to 1 (per row).