code: def weighted_majority_voting_rule(votes, weights, labels_set=None):
      """Applies the weighted majority voting rule based on the votes obtained by
      each base classifier and their
      respective weights.
  
      Parameters
      ----------
      votes : array of shape (n_samples, n_classifiers),
          The votes obtained by each classifier for each sample.
  
      weights : array of shape (n_samples, n_classifiers)
          Weights associated to each base classifier for each sample
  
      labels_set : (Default=None) set with the possible classes in the problem.
  
      Returns
      -------
      predicted_label : array of shape (n_samples)
          The label of each query sample predicted using the majority voting rule
      """
      w_votes, labels_set = get_weighted_votes(
          votes, weights, labels_set
      )
      predicted_label = labels_set[np.argmax(w_votes, axis=1)]
      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 5 for calling a global function with example usage: weighted_majority_voting_rule(votes, weights, labels_set) and returns: predicted_label