code: def cosine_lr_schedule(optimizer, epoch, max_epoch, init_lr, min_lr):
      """Decay the learning rate"""
      lr = (init_lr - min_lr) * 0.5 * (
          1.0 + math.cos(math.pi * epoch / max_epoch)
      ) + min_lr
      for param_group in optimizer.param_groups:
          param_group["lr"] = lr
  
imports: import math
  import numpy
  import io
  import os
  import time
  from collections import defaultdict, deque
  import datetime
  import torch
  import torch.distributed
label_desc: Use image node_id 1 for calling a global function with example usage: cosine_lr_schedule(optimizer, epoch, max_epoch, init_lr, min_lr) without return types