class_docstr: Early stopping callback.
  
  This callback is CatBoost specific.
  
  Parameters
  ----------
  stopping_rounds : int or tuple
     If int, The possible number of rounds without the trend occurrence.
     If tuple, contains early stopping class as first element and class init kwargs as second element.
  eval_metric : str
     The eval_metric to use for early stopping. Must also be specified in the CatBoost model params.
  compare_key : str, default = 'validation'
      The data to use for scoring. It is recommended to keep as default.
code: def after_iteration(self, info):
      is_best_iter = False
      if self.is_quantile:
          # FIXME: CatBoost adds extra ',' in the metric name if quantile levels are not balanced
          # e.g., 'MultiQuantile:alpha=0.1,0.25,0.5,0.95' becomes 'MultiQuantile:alpha=0.1,,0.25,0.5,0.95'
          eval_metric_name = [
              k
              for k in info.metrics[self.compare_key]
              if k.startswith(CATBOOST_QUANTILE_PREFIX)
          ][0]
      else:
          eval_metric_name = self.eval_metric_name
      cur_score = info.metrics[self.compare_key][eval_metric_name][-1]
      if not self.is_max_optimal:
          cur_score *= -1
      if self.best_score is None:
          self.best_score = cur_score
      elif cur_score > self.best_score:
          is_best_iter = True
          self.best_score = cur_score
  
      should_stop = self.es.update(
          cur_round=info.iteration, is_best=is_best_iter
      )
      return not should_stop
  
file_path: autogluon/tabular/src/autogluon/tabular/models/catboost/callbacks.py
imports: import logging
  import time
  from autogluon.common.utils.resource_utils import ResourceManager
  from .catboost_utils import CATBOOST_QUANTILE_PREFIX
label_desc: Use image node_id 2 for calling the EarlyStoppingCallback obj's underlying member method code with example usage: obj.after_iteration(info) and returns: unknown