class_docstr: Internal early stopping callable class.
class_docstr_tok: ["Internal","early","stopping","callable","class","."]
code: def __init__(
      self,
      stopping_rounds: int,
      first_metric_only: bool = False,
      verbose: bool = True,
      min_delta: Union[float, List[float]] = 0.0,
  ) -> None:
      if not isinstance(stopping_rounds, int) or stopping_rounds <= 0:
          raise ValueError(
              f"stopping_rounds should be an integer and greater than 0. got: {stopping_rounds}"
          )
  
      self.order = 30
      self.before_iteration = False
  
      self.stopping_rounds = stopping_rounds
      self.first_metric_only = first_metric_only
      self.verbose = verbose
      self.min_delta = min_delta
  
      self.enabled = True
      self._reset_storages()
  
imports: from collections import OrderedDict
  from dataclasses import dataclass
  from functools import partial
  from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
  from .basic import Booster, _ConfigAliases, _LGBM_BoosterEvalMethodResultType, _LGBM_BoosterEvalMethodResultWithStandardDeviationType, _log_info, _log_warning
label_desc: Use image node_id 1 to create a new _EarlyStoppingCallback object  with example: obj = _EarlyStoppingCallback(stopping_rounds, first_metric_only, verbose, min_delta)