class_docstr: Linearly increases learning rate from 0 to 1 over `warmup` fraction of training steps.
  If `cycles` (default=1.) is different from default, learning rate follows `cycles` times a cosine decaying
  learning rate (with hard restarts).
code: def get_lr_(self, progress):
      if progress < self.warmup:
          return progress / self.warmup
      else:
          progress = (progress - self.warmup) / (
              1 - self.warmup
          )  # progress after warmup
          ret = 0.5 * (
              1.0 + math.cos(math.pi * ((self.cycles * progress) % 1))
          )
          return ret
  
imports: import math
  import torch
  from torch.optim import Optimizer
  from torch.optim.optimizer import required
  from torch.nn.utils import clip_grad_norm_
  import logging
  import abc
  import sys
label_desc: Use image node_id 2 for calling the WarmupCosineWithHardRestartsSchedule obj's underlying member method code with example usage: obj.get_lr_(progress) and returns: unknown, ret