code: def weighted_majority_voting(classifier_ensemble, weights, X):
      """Apply the weighted majority voting rule to predict the label of each
      sample in X. The size of the weights vector should be equal to the size of
      the ensemble.
  
      Parameters
      ----------
      classifier_ensemble : list of shape = [n_classifiers]
          Containing the ensemble of classifiers used in the aggregation scheme.
  
      weights : array of shape (n_samples, n_classifiers)
                Weights associated to each base classifier for each sample
  
  
      X : array of shape (n_samples, n_features)
          The input data.
  
      Returns
      -------
      predicted_label : array of shape (n_samples)
          The label of each query sample predicted using the majority voting rule
      """
      votes = _get_ensemble_votes(classifier_ensemble, X)
      predicted_label = weighted_majority_voting_rule(votes, weights)
      return predicted_label
  
imports: import numpy
  from scipy.stats.mstats import mode
  from sklearn.utils.validation import check_array
  from deslib.util.prob_functions import softmax
label_desc: Use image node_id 2 for calling a global function with example usage: weighted_majority_voting(classifier_ensemble, weights, X) and returns: predicted_label