code: def __call__(self, trial):
      param = {
          "objective": self.objective,
          "metric": self.eval_metric_name,
          "verbosity": -1,
          "boosting_type": "gbdt",
          "learning_rate": trial.suggest_categorical(
              "learning_rate", [0.0125, 0.025, 0.05, 0.1]
          ),
          "num_leaves": trial.suggest_int("num_leaves", 2, 2048),
          "lambda_l1": trial.suggest_float(
              "lambda_l1", 1e-8, 10.0, log=True
          ),
          "lambda_l2": trial.suggest_float(
              "lambda_l2", 1e-8, 10.0, log=True
          ),
          "feature_fraction": min(
              trial.suggest_float("feature_fraction", 0.3, 1.0 + EPS),
              1.0,
          ),
          "bagging_fraction": min(
              trial.suggest_float("bagging_fraction", 0.3, 1.0 + EPS),
              1.0,
          ),
          "bagging_freq": trial.suggest_int("bagging_freq", 1, 7),
          "min_data_in_leaf": trial.suggest_int(
              "min_data_in_leaf", 1, 100
          ),
          "feature_pre_filter": False,
          "seed": self.seed,
          "num_threads": self.n_jobs,
          "extra_trees": trial.suggest_categorical(
              "extra_trees", [True, False]
          ),
      }
  
      if self.cat_features_indices:
          param["cat_feature"] = self.cat_features_indices
          param["cat_l2"] = trial.suggest_float("cat_l2", EPS, 100.0)
          param["cat_smooth"] = trial.suggest_float(
              "cat_smooth", EPS, 100.0
          )
  
      if self.num_class is not None:
          param["num_class"] = self.num_class
  
      try:
          metric_name = self.eval_metric_name
          if metric_name == "custom":
              metric_name = self.custom_eval_metric_name
          pruning_callback = optuna.integration.LightGBMPruningCallback(
              trial, metric_name, "validation"
          )
          early_stopping_callback = lgb.early_stopping(
              self.early_stopping_rounds, verbose=False
          )
  
          gbm = lgb.train(
              param,
              self.dtrain,
              valid_sets=[self.dvalid],
              valid_names=["validation"],
              callbacks=[pruning_callback, early_stopping_callback],
              num_boost_round=self.rounds,
              feval=self.custom_eval_metric,
          )
  
          preds = gbm.predict(self.X_validation)
          score = self.eval_metric(self.y_validation, preds)
          if Metric.optimize_negative(self.eval_metric.name):
              score *= -1.0
      except optuna.exceptions.TrialPruned as e:
          raise e
      except Exception as e:
          print("Exception in LightgbmObjective", str(e))
          return None
  
      return score
  
file_path: mljar-supervised/supervised/tuner/optuna/lightgbm.py
imports: import lightgbm
  import numpy
  import optuna
  import pandas
  from supervised.algorithms.lightgbm import lightgbm_eval_metric, lightgbm_objective
  from supervised.algorithms.registry import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, REGRESSION
  from supervised.utils.metric import Metric, lightgbm_eval_metric_accuracy, lightgbm_eval_metric_average_precision, lightgbm_eval_metric_f1, lightgbm_eval_metric_pearson, lightgbm_eval_metric_r2, lightgbm_eval_metric_spearman, lightgbm_eval_metric_user_defined
label_desc: Use image node_id 2 for calling the LightgbmObjective obj's underlying member method code with example usage: obj.__call__(trial) and returns: score, None