code: def __init__(self, params, callbacks=[]):
      logger.debug("ModelFramework.__init__")
      self.uid = str(uuid.uuid4())
  
      for i in [
          "learner",
          "validation_strategy",
      ]:  # mandatory parameters
          if i not in params:
              msg = "Missing {0} parameter in ModelFramework params".format(
                  i
              )
              logger.error(msg)
              raise ValueError(msg)
  
      self.params = params
      self.callbacks = CallbackList(callbacks)
  
      self._name = params.get("name", "model")
      self.additional_params = params.get("additional")
      self.preprocessing_params = params.get("preprocessing")
      self.validation_params = params.get("validation_strategy")
      self.learner_params = params.get("learner")
  
      self._ml_task = params.get("ml_task")
      self._explain_level = params.get("explain_level")
      self._is_stacked = params.get("is_stacked", False)
  
      self.validation = None
      self.preprocessings = []
      self.learners = []
  
      self.train_time = None
      self.final_loss = None
      self.metric_name = None
      self.oof_predictions = None
      self._additional_metrics = None
      self._threshold = None  # used only for binary classifiers
      self._max_time_for_learner = params.get(
          "max_time_for_learner", 3600
      )
      self._oof_predictions_fname = None
      self._single_prediction_time = (
          None  # prediction time on single sample
      )
      self._optuna_time_budget = params.get("optuna_time_budget")
      self._optuna_init_params = params.get("optuna_init_params", {})
      self._optuna_verbose = params.get("optuna_verbose", True)
  
      self._fairness_metric = params.get("fairness_metric")
      self._fairness_threshold = params.get("fairness_threshold")
      self._privileged_groups = params.get("privileged_groups", [])
      self._underprivileged_groups = params.get(
          "underprivileged_groups", []
      )
      self._fairness_optimization = params.get("fairness_optimization")
      self._is_fair = None
  
      # the automl random state from AutoML constructor, used in Optuna optimizer
      self._automl_random_state = params.get("automl_random_state", 42)
  
imports: import copy
  import gc
  import json
  import logging
  import os
  import sys
  import time
  import uuid
  import zipfile
  import numpy
  import pandas
  from supervised.algorithms.factory import AlgorithmFactory
  from supervised.algorithms.registry import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, REGRESSION, AlgorithmsRegistry
  from supervised.callbacks.callback_list import CallbackList
  from supervised.exceptions import AutoMLException
  from supervised.preprocessing.exclude_missing_target import ExcludeRowsMissingTarget
  from supervised.preprocessing.preprocessing import Preprocessing
  from supervised.utils.additional_metrics import AdditionalMetrics
  from supervised.utils.config import LOG_LEVEL
  from supervised.utils.metric import Metric
  from supervised.validation.validation_step import ValidationStep
  from supervised.utils.jsonencoder import MLJSONEncoder
  import joblib
  import optuna
  from supervised.tuner.optuna.tuner import OptunaTuner
  from supervised.utils.config import mem
  from supervised.utils.learning_curves import LearningCurves
label_desc: Use image node_id 1 to create a new ModelFramework object  with example: obj = ModelFramework(params, callbacks)