code: def decision_function(self, X, method='most-wins'):
          
          X = _check_2d_inp(X, reshape = True)
          if method == 'most-wins':
              return self._decision_function_winners(X)
          elif method == 'goodness':
              return self._decision_function_goodness(X)
          else:
              raise ValueError("method must be one of 'most-wins' or 'goodness'.")
docs: Calculate a 'goodness' distribution over labels
          
          Note
          ----
          Predictions can be calculated either by counting which class wins the most
          pairwise comparisons (as in [1] and [2]), or - for classifiers with a 'predict_proba'
          method - by taking into account also the margins of the prediction difference
          for one class over the other for each comparison.
          
          If passing method = 'most-wins', this 'decision_function' will output the proportion
          of comparisons that each class won. If passing method = 'goodness', it sums the
          outputs from 'predict_proba' from each pairwise comparison and divides it by the
          number of comparisons.
          
          Using method = 'goodness' requires the base classifier to have a 'predict_proba' method.
          
          Parameters
          ----------
          X : array (n_samples, n_features)
              Data for which to predict the cost of each label.
          method : str, either 'most-wins' or 'goodness':
              How to decide the best label (see Note)
          
          Returns
          -------
          pred : array (n_samples, n_classes)
              A goodness score (more is better) for each label and observation.
              If passing method='most-wins', it counts the proportion of comparisons
              that each class won.
              If passing method='goodness', it sums the outputs from 'predict_proba' from
              each pairwise comparison and divides it by the number of comparisons.
              
          References
          ----------
          [1] Beygelzimer, A., Dani, V., Hayes, T., Langford, J., & Zadrozny, B. (2005)
              Error limiting reductions between classification tasks.
          [2] Beygelzimer, A., Langford, J., & Zadrozny, B. (2008).
              Machine learning techniques-reductions between prediction quality metrics.