code: def predict(self, X, batch_size=128, verbose=0):
      predictions = list(
          map(
              lambda model: model.predict(X, batch_size, verbose),
              self.model_list,
          )
      )
      nb_preds = len(X)
  
      if self.voting == "hard":
          for i, pred in enumerate(predictions):
              pred = list(
                  map(lambda probas: np.argmax(probas, axis=-1), pred)
              )
              predictions[i] = np.asarray(pred).reshape(nb_preds, 1)
          argmax_list = list(np.concatenate(predictions, axis=1))
          votes = np.asarray(
              list(map(lambda arr: max(set(arr)), argmax_list))
          )
      if self.voting == "soft":
          for i, pred in enumerate(predictions):
              pred = list(
                  map(lambda probas: probas * self.weights[i], pred)
              )
              predictions[i] = np.asarray(pred).reshape(
                  nb_preds, self.nb_classes, 1
              )
          weighted_preds = np.concatenate(predictions, axis=2)
          weighted_avg = np.mean(weighted_preds, axis=2)
          votes = np.argmax(weighted_avg, axis=1)
  
      return votes
  
imports: import numpy
  from keras.models import model_from_yaml
label_desc: Use image node_id 2 for calling the VotingModel obj's underlying member method code with example usage: obj.predict(X, batch_size, verbose) and returns: votes