code: def get_weighted_votes(votes, weights, labels_set=None):
      if weights.shape != votes.shape:
          raise ValueError(
              "The shape of the arrays votes and weights should be the "
              "same. weights = {} "
              "while votes = {}".format(weights.shape, votes.shape)
          )
      if labels_set is None:
          labels_set = np.unique(votes.astype(int))
  
      n_samples = votes.shape[0]
      w_votes = np.zeros((len(labels_set), n_samples))
      ma_weights = weights.view(np.ma.MaskedArray)
  
      for ind, label in enumerate(labels_set):
          ma_weights.mask = votes != label
          w_votes[ind, :] = ma_weights.sum(axis=1)
  
      return w_votes.T, labels_set
  
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 6 for calling a global function with example usage: get_weighted_votes(votes, weights, labels_set) and returns: w_votes,  labels_set