class_docstr: Class for LR Schedulers.
  
  Includes some basic functionality by default - setting up the warmup
  scheduler, passing the correct number of steps to train_step, loading and
  saving states.
  Subclasses must implement abstract methods train_step() and valid_step().
  Schedulers should be initialized with lr_scheduler_factory().
  __init__() should not be called directly.
code: def get_last_lr(self):
      s = (
          self.warmup_scheduler
          if self._is_lr_warming_up()
          else self.scheduler
      )
      try:
          # pytorch 1.5 or newer
          return s.get_last_lr()[0]
      except AttributeError:
          # TODO: upon getting rid of pytorch 1.4, kill this
          # pytorch 1.4 or older
          return s.optimizer.param_groups[0]["lr"]
  
imports: import math
  from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from abc import abstractmethod
  from torch import optim
  import numpy
  from parlai.core.exceptions import StopTrainException
  from parlai.utils.misc import warn_once
label_desc: Use image node_id 3 for calling the ParlAILRScheduler obj's underlying member method code with example usage: obj.get_last_lr() and returns: s, s