code: def predict(self, X, X_stacked=None):
      logger.debug(
          "Ensemble.predict with {} models".format(
              len(self.selected_models)
          )
      )
      y_predicted_ensemble = None
      total_repeat = 0.0
  
      for selected in self.selected_models:
          model = selected["model"]
          repeat = selected["repeat"]
          total_repeat += repeat
  
          if model._is_stacked:
              y_predicted_from_model = model.predict(X_stacked)
          else:
              y_predicted_from_model = model.predict(X)
  
          prediction_cols = []
          if self._ml_task in [
              BINARY_CLASSIFICATION,
              MULTICLASS_CLASSIFICATION,
          ]:
              prediction_cols = [
                  c
                  for c in y_predicted_from_model.columns
                  if "prediction_" in c
              ]
          else:  # REGRESSION
              prediction_cols = ["prediction"]
          y_predicted_from_model = y_predicted_from_model[
              prediction_cols
          ]
          y_predicted_ensemble = (
              y_predicted_from_model * repeat
              if y_predicted_ensemble is None
              else y_predicted_ensemble
              + y_predicted_from_model * repeat
          )
  
      y_predicted_ensemble /= total_repeat
  
      if self._ml_task == MULTICLASS_CLASSIFICATION:
          cols = y_predicted_ensemble.columns.tolist()
          # prediction_
          labels = {i: v[11:] for i, v in enumerate(cols)}
  
          y_predicted_ensemble["label"] = np.argmax(
              np.array(y_predicted_ensemble[prediction_cols]), axis=1
          )
          y_predicted_ensemble["label"] = y_predicted_ensemble[
              "label"
          ].map(labels)
  
      return y_predicted_ensemble
  
imports: import copy
  import json
  import logging
  import operator
  import os
  import time
  import uuid
  import numpy
  import pandas
  from supervised.algorithms.algorithm import BaseAlgorithm
  from supervised.algorithms.registry import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, REGRESSION
  from supervised.exceptions import NotTrainedException
  from supervised.model_framework import ModelFramework
  from supervised.utils.additional_metrics import AdditionalMetrics
  from supervised.utils.config import LOG_LEVEL
  from supervised.utils.metric import Metric
  from supervised.utils.jsonencoder import MLJSONEncoder
  import matplotlib.pyplot
  from tabulate import tabulate
  from supervised.utils.learning_curves import LearningCurves
label_desc: Use image node_id 22 for calling the Ensemble obj's underlying member method code with example usage: obj.predict(X, X_stacked) and returns: y_predicted_ensemble