code: def __init__(
      self,
      optimizer: Optimizer,
      max_lr: float,
      div_factor: float,
      final_div_factor: float,
      total_steps: int,
      pct_start: float,
      anneal_strategy: str = "linear",
      cycle_momentum: bool = False,
  ):
      super().__init__(optimizer)
      self.initial_lr = max_lr / div_factor
      self.max_lr = max_lr
      self.min_lr = self.initial_lr / final_div_factor
      self.total_steps = total_steps
      self.pct_start = pct_start
      assert (
          anneal_strategy == "linear"
      ), "only linear annealing supported"
      assert not cycle_momentum, "cycle momentum not supported"
      self.optimizer.lr.assign(self.get_lr()).realize()
  
imports: import math
  from typing import List
  from tinygrad.nn.optim import Optimizer
  from tinygrad.tensor import Tensor
label_desc: Use image node_id 1 to create a new OneCycleLR object from inherited base classes: LR_Scheduler with example: obj = OneCycleLR(optimizer, max_lr, div_factor, final_div_factor, total_steps, pct_start, anneal_strategy, cycle_momentum)