code: def get_params_stack_models(self, stacked_models):
      if stacked_models is None or len(stacked_models) == 0:
          return []
  
      X_train_stacked_path = ""
      added_columns = []
  
      # model_types = ["Xgboost", "LightGBM", "CatBoost"]
      model_types = [
          "Xgboost",
          "LightGBM",
          "CatBoost",
          "Random Forest",
          "Extra Trees",
          "Neural Network",
      ]
      generated_params = {m: [] for m in model_types}
      types_score_order = []
      # resue old params
      for m in stacked_models:
          # use only Xgboost, LightGBM and CatBoost as stacked models
          if m.get_type() not in model_types:
              continue
  
          if m.get_type() not in types_score_order:
              types_score_order += [m.get_type()]
  
          # the below condition is only true for fair models
          if self._fairness_metric is None and m.params.get(
              "injected_sample_weight", False
          ):
              # dont use boost_on_errors model for stacking
              # there will be additional boost_on_errors step
              continue
  
          params = copy.deepcopy(m.params)
  
          params["validation_strategy"]["X_path"] = params[
              "validation_strategy"
          ]["X_path"].replace("X.data", "X_stacked.data")
  
          params["name"] = params["name"] + "_Stacked"
          params["is_stacked"] = True
          params["status"] = "initialized"
          params["final_loss"] = None
          params["train_time"] = None
          params["data_type"] += "_stacked"
          if self._optuna_time_budget is not None:
              params["optuna_time_budget"] = self._optuna_time_budget
              params["optuna_init_params"] = self._optuna_init_params
              params["optuna_verbose"] = self._optuna_verbose
  
          if "model_architecture_json" in params["learner"]:
              # the new model will be created with wider input size
              del params["learner"]["model_architecture_json"]
  
          if self._ml_task == REGRESSION:
              # scale added predictions in regression if the target was scaled (in the case of NN)
              # this piece of code might not work, leave it as it is, because NN is not used for training with Stacked Data
              target_preprocessing = params["preprocessing"][
                  "target_preprocessing"
              ]
              scale = None
              if "scale_log_and_normal" in target_preprocessing:
                  scale = "scale_log_and_normal"
              elif "scale_normal" in target_preprocessing:
                  scale = "scale_normal"
              if scale is not None:
                  for col in added_columns:
                      params["preprocessing"]["columns_preprocessing"][
                          col
                      ] = [scale]
  
          generated_params[m.get_type()] += [params]
  
      return_params = []
      for i in range(100):
          total = 0
          for m in types_score_order:
              if generated_params[m]:
                  return_params += [generated_params[m].pop(0)]
              total += len(generated_params[m])
          if total == 0:
              break
  
      return return_params
  
imports: import copy
  import json
  import logging
  import os
  import numpy
  import pandas
  from sklearn.preprocessing import OneHotEncoder
  from supervised.algorithms.catboost import catboost_eval_metric
  from supervised.algorithms.lightgbm import lightgbm_eval_metric
  from supervised.algorithms.registry import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, REGRESSION, AlgorithmsRegistry
  from supervised.algorithms.xgboost import xgboost_eval_metric
  from supervised.preprocessing.label_encoder import LabelEncoder
  from supervised.preprocessing.preprocessing_categorical import PreprocessingCategorical
  from supervised.tuner.hill_climbing import HillClimbing
  from supervised.tuner.preprocessing_tuner import PreprocessingTuner
  from supervised.tuner.random_parameters import RandomParameters
  from supervised.utils.config import LOG_LEVEL
  from supervised.utils.utils import dump_data, load_data
label_desc: Use image node_id 13 for calling the MljarTuner obj's underlying member method code with example usage: obj.get_params_stack_models(stacked_models) and returns: return_params, list