code: def majority_vote(scores, n_classes=2, weights=None):
      """Combination method to merge the scores from multiple estimators
      by majority vote.
  
      Parameters
      ----------
      scores : numpy array of shape (n_samples, n_estimators)
          Score matrix from multiple estimators on the same samples.
  
      n_classes : int, optional (default=2)
          The number of classes in scores matrix
  
      weights : numpy array of shape (1, n_estimators)
          If specified, using weighted majority weight.
  
      Returns
      -------
      combined_scores : numpy array of shape (n_samples, )
          The combined scores.
  
      """
  
      scores = check_array(scores)
  
      # assert only discrete scores are combined with majority vote
      check_classification_targets(scores)
  
      n_samples, n_estimators = scores.shape[0], scores.shape[1]
  
      vote_results = np.zeros(
          [
              n_samples,
          ]
      )
  
      if weights is not None:
          assert_equal(scores.shape[1], weights.shape[1])
  
      # equal weights if not set
      else:
          weights = np.ones([1, n_estimators])
  
      for i in range(n_samples):
          vote_results[i] = weighted_mode(scores[i, :], weights)[0][0]
  
      return vote_results.ravel()
  
file_path: combo/combo/models/score_comb.py
imports: import numpy
  from numpy.random import RandomState
  from sklearn.utils import check_array
  from sklearn.utils import column_or_1d
  from sklearn.utils import shuffle
  from sklearn.utils.extmath import weighted_mode
  from sklearn.utils.random import sample_without_replacement
  from numpy.testing import assert_equal
  from sklearn.utils.multiclass import check_classification_targets
  from pyod.utils.utility import check_parameter
label_desc: Use image node_id 7 for calling a global function with example usage: majority_vote(scores, n_classes, weights) and returns: vote_results