code: def aggregation_most_frequent(logits):
      """
      This aggregation mechanism takes the softmax/logit output of several models
      resulting from inference on identical inputs and computes the most frequent
      label. It is deterministic (no noise injection like noisy_max() above.
      :param logits: logits or probabilities for each sample
      :return:
      """
      # Compute labels from logits/probs and reshape array properly
      labels = labels_from_probs(logits)
      labels_shape = np.shape(labels)
      labels = labels.reshape((labels_shape[0], labels_shape[1]))
  
      # Initialize array to hold final labels
      result = np.zeros(int(labels_shape[1]))
  
      # Parse each sample
      for i in xrange(int(labels_shape[1])):
          # Count number of votes assigned to each class
          label_counts = np.bincount(labels[:, i], minlength=10)
  
          label_counts = np.asarray(label_counts, dtype=np.int32)
  
          # Result is the most frequent label
          result[i] = np.argmax(label_counts)
  
      return np.asarray(result, dtype=np.int32)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from six.moves import xrange
label_desc: Use image node_id 3 for calling a global function with example usage: aggregation_most_frequent(logits) and returns: np