class_docstr: Double Ensemble Model
code: def retrieve_loss_curve(self, model, df_train, features):
      if self.base_model == "gbm":
          num_trees = model.num_trees()
          x_train, y_train = (
              df_train["feature"].loc[:, features],
              df_train["label"],
          )
          # Lightgbm need 1D array as its label
          if y_train.values.ndim == 2 and y_train.values.shape[1] == 1:
              y_train = np.squeeze(y_train.values)
          else:
              raise ValueError(
                  "LightGBM doesn't support multi-label training"
              )
  
          N = x_train.shape[0]
          loss_curve = pd.DataFrame(np.zeros((N, num_trees)))
          pred_tree = np.zeros(N, dtype=float)
          for i_tree in range(num_trees):
              pred_tree += model.predict(
                  x_train.values,
                  start_iteration=i_tree,
                  num_iteration=1,
              )
              loss_curve.iloc[:, i_tree] = self.get_loss(
                  y_train, pred_tree
              )
      else:
          raise ValueError("not implemented yet")
      return loss_curve
  
imports: import lightgbm
  import numpy
  import pandas
  from typing import Text, Union
  from ...model.base import Model
  from ...data.dataset import DatasetH
  from ...data.dataset.handler import DataHandlerLP
  from ...model.interpret.base import FeatureInt
  from ...log import get_module_logger
label_desc: Use image node_id 8 for calling the DEnsembleModel obj's underlying member method code with example usage: obj.retrieve_loss_curve(model, df_train, features) and returns: loss_curve