code: def __init__(
      self,
      ml_task,
      X_train,
      y_train,
      sample_weight,
      X_validation,
      y_validation,
      sample_weight_validation,
      eval_metric,
      cat_features_indices,
      n_jobs,
      random_state,
  ):
      self.ml_task = ml_task
      self.X_train = X_train
      self.y_train = y_train
      self.sample_weight = sample_weight
      self.X_validation = X_validation
      self.y_validation = y_validation
      self.eval_metric = eval_metric
      self.cat_features = cat_features_indices
      self.eval_set = Pool(
          data=X_validation,
          label=y_validation,
          cat_features=self.cat_features,
          weight=sample_weight_validation,
      )
      self.n_jobs = n_jobs
      self.rounds = 1000
      self.learning_rate = 0.0125
      self.early_stopping_rounds = 50
      self.seed = random_state
  
      self.objective = catboost_objective(
          ml_task, self.eval_metric.name
      )
      self.eval_metric_name = catboost_eval_metric(
          ml_task, self.eval_metric.name
      )
      self.custom_eval_metric = None
      if self.eval_metric_name == "spearman":
          self.custom_eval_metric = CatBoostEvalMetricSpearman()
      elif self.eval_metric_name == "pearson":
          self.custom_eval_metric = CatBoostEvalMetricPearson()
      elif self.eval_metric_name == "average_precision":
          self.custom_eval_metric = CatBoostEvalMetricAveragePrecision()
      elif self.eval_metric_name == "mse":
          self.custom_eval_metric = CatBoostEvalMetricMSE()
      elif self.eval_metric_name == "user_defined_metric":
          self.custom_eval_metric = CatBoostEvalMetricUserDefined()
  
file_path: mljar-supervised/supervised/tuner/optuna/catboost.py
imports: import catboost
  import optuna
  from catboost import CatBoost, CatBoostClassifier, CatBoostRegressor, Pool
  from supervised.algorithms.catboost import catboost_eval_metric, catboost_objective
  from supervised.algorithms.registry import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, REGRESSION
  from supervised.utils.metric import CatBoostEvalMetricAveragePrecision, CatBoostEvalMetricMSE, CatBoostEvalMetricPearson, CatBoostEvalMetricSpearman, CatBoostEvalMetricUserDefined, Metric
label_desc: Use image node_id 1 to create a new CatBoostObjective object  with example: obj = CatBoostObjective(ml_task, X_train, y_train, sample_weight, X_validation, y_validation, sample_weight_validation, eval_metric, cat_features_indices, n_jobs, random_state)