code: def __init__(
      self,
      config: LRSchedulerConfig,
      optimizer: Optimizer,
      steps_per_checkpoint: int,
      total_steps: int,
  ):
      self.config = config
      self.optimizer = optimizer
  
      # Scheduler updated each training step
      self.step_info = StepInfo(
          steps_per_checkpoint, total_steps, self.config
      )
      self._train_scheduler = get_schedule_with_warmup_and_decay(
          self.config, self.optimizer, self.step_info
      )
  
      # Scheduler updated each eval step
      self._eval_scheduler = None
      if self.config.reduce_on_plateau > 0:
          mode = (
              "min"
              if get_metric_objective(self.config.reduce_eval_metric)
              == MINIMIZE
              else "max"
          )
          self._eval_scheduler = ReduceLROnPLateauCappedDecreases(
              optimizer=self.optimizer,
              mode=mode,
              reduce_limit=self.config.reduce_on_plateau,
              factor=self.config.reduce_on_plateau_rate,
              patience=self.config.reduce_on_plateau_patience,
          )
  
imports: import logging
  import math
  from typing import Any, Callable, Dict
  from torch.optim import Optimizer
  from torch.optim.lr_scheduler import CosineAnnealingWarmRestarts, LambdaLR, ReduceLROnPlateau, SequentialLR
  from ludwig.constants import MINIMIZE, TRAINING, VALIDATION
  from ludwig.modules.metric_registry import get_metric_objective
  from ludwig.schema.lr_scheduler import LRSchedulerConfig
  from ludwig.utils.metric_utils import TrainerMetric
  from ludwig.utils.trainer_utils import ProgressTracker
label_desc: Use image node_id 1 to create a new LRScheduler object  with example: obj = LRScheduler(config, optimizer, steps_per_checkpoint, total_steps)