class_docstr: Base class of a learning rate scheduler.
  
  A scheduler returns a new learning rate based on the number of updates that have
  been performed.
  
  Parameters
  ----------
  base_lr : float, optional
      The initial learning rate.
  warmup_steps: int
      number of warmup steps used before this scheduler starts decay
  warmup_begin_lr: float
      if using warmup, the learning rate from which it starts warming up
  warmup_mode: string
      warmup can be done in two modes.
      'linear' mode gradually increases lr with each step in equal increments
      'constant' mode keeps lr at warmup_begin_lr for warmup_steps
code: def get_warmup_lr(self, num_update):
      assert num_update < self.warmup_steps
      if self.warmup_mode == "linear":
          increase = (
              (self.warmup_final_lr - self.warmup_begin_lr)
              * float(num_update)
              / float(self.warmup_steps)
          )
          return self.warmup_begin_lr + increase
      elif self.warmup_mode == "constant":
          return self.warmup_begin_lr
      else:
          raise ValueError(f"Invalid warmup mode {self.warmup_mode}")
  
imports: import logging
  from math import cos, pi
label_desc: Use image node_id 2 for calling the LRScheduler obj's underlying member method code with example usage: obj.get_warmup_lr(num_update) and returns: unknown, self