code: def load(results_path, model_subpath, models_map):
      model_path = os.path.join(results_path, model_subpath)
      logger.info(f"Loading ensemble from {model_path}")
  
      json_desc = json.load(
          open(os.path.join(model_path, "ensemble.json"))
      )
  
      ensemble = Ensemble(
          json_desc.get("optimize_metric"), json_desc.get("ml_task")
      )
      ensemble._name = json_desc.get("name", ensemble._name)
      ensemble._threshold = json_desc.get(
          "threshold", ensemble._threshold
      )
      for m in json_desc.get("selected_models", []):
          ensemble.selected_models += [
              {"model": models_map[m["model"]], "repeat": m["repeat"]}
          ]
  
      ensemble.best_loss = json_desc.get(
          "final_loss", ensemble.best_loss
      )
      ensemble.train_time = json_desc.get(
          "train_time", ensemble.train_time
      )
      ensemble._is_stacked = json_desc.get(
          "is_stacked", ensemble._is_stacked
      )
      predictions_fname = json_desc.get("predictions_fname")
      if predictions_fname is not None:
          ensemble._oof_predictions_fname = os.path.join(
              results_path, predictions_fname
          )
  
      return 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 27 for calling the Ensemble obj's underlying member method code with example usage: obj.load(results_path, model_subpath, models_map) and returns: ensemble