code: def __init__(self, optimizer, epochs, min_lr_factor=0.05, max_lr=1.0):
      half_epochs = epochs // 2
      decay_epochs = int(epochs * 0.05)
  
      lr_grow = np.linspace(min_lr_factor, max_lr, num=half_epochs)
      lr_down = np.linspace(
          max_lr,
          min_lr_factor,
          num=int(epochs - half_epochs - decay_epochs),
      )
      lr_decay = np.linspace(
          min_lr_factor, min_lr_factor * 0.01, int(decay_epochs)
      )
      self.learning_rates = (
          np.concatenate((lr_grow, lr_down, lr_decay)) / max_lr
      )
      super().__init__(optimizer)
  
imports: import math
  import warnings
  import numpy
  from torch import nn
  from torch.optim.optimizer import Optimizer
  from torch.optim.lr_scheduler import _LRScheduler, LambdaLR, ExponentialLR, CyclicLR, MultiStepLR, ReduceLROnPlateau, CosineAnnealingLR, CosineAnnealingWarmRestarts
label_desc: Use image node_id 1 to create a new OnceCycleLR object from inherited base classes: _LRScheduler with example: obj = OnceCycleLR(optimizer, epochs, min_lr_factor, max_lr)