code: def lightgbm_objective(ml_task, automl_eval_metric):
      objective = "regression"
      if ml_task == BINARY_CLASSIFICATION:
          objective = "binary"
      elif ml_task == MULTICLASS_CLASSIFICATION:
          objective = "multiclass"
      else:  # ml_task == REGRESSION
          objective = "regression"
      return objective
  
imports: import contextlib
  import copy
  import logging
  import os
  import time
  import lightgbm
  import numpy
  import pandas
  from sklearn.base import ClassifierMixin, RegressorMixin
  from supervised.algorithms.algorithm import BaseAlgorithm
  from supervised.algorithms.registry import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, REGRESSION, AlgorithmsRegistry
  from supervised.utils.config import LOG_LEVEL
  from supervised.utils.metric import 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 1 for calling a global function with example usage: lightgbm_objective(ml_task, automl_eval_metric) and returns: objective