code: def _get_wd(self, optimizer):
      if self.last_epoch == 0:
          return self.base_wds
      elif (self.last_epoch - 1 - self.t_max) % (2 * self.t_max) == 0:
          return [
              group["weight_decay"]
              + (base_lr - self.eta_min)
              * (1 - math.cos(math.pi / self.t_max))
              / 2
              for base_lr, group in zip(
                  self.base_wds, optimizer.param_groups
              )
          ]
      return [
          (1 + math.cos(math.pi * self.last_epoch / self.t_max))
          / (1 + math.cos(math.pi * (self.last_epoch - 1) / self.t_max))
          * (group["weight_decay"] - self.eta_min)
          + self.eta_min
          for group in optimizer.param_groups
      ]
  
imports: import math
label_desc: Use image node_id 2 for calling the CosineWDSchedule obj's underlying member method code with example usage: obj._get_wd(optimizer) and returns: unknown, self, unknown