code: def linear_decay(
      current_step: int,
      num_training_steps: int,
      num_warmup_steps: int,
      config: LRSchedulerConfig,
  ):
      return max(
          0.0,
          float(num_training_steps - num_warmup_steps - current_step)
          / float(max(1, num_training_steps - num_warmup_steps)),
      )
  
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 3 for calling a global function with example usage: linear_decay(current_step, num_training_steps, num_warmup_steps, config) and returns: max