code: def warmup_cosine(x, warmup=0.002):
      if x < warmup:
          return x / warmup
      return 0.5 * (1.0 + torch.cos(math.pi * x))
  
file_path: deepspeedexamples/training/BingBertSquad/pytorch_pretrained_bert/optimization.py
imports: import math
  import torch
  from torch.optim import Optimizer
  from torch.optim.optimizer import required
  from torch.nn.utils import clip_grad_norm_
label_desc: Use image node_id 1 for calling a global function with example usage: warmup_cosine(x, warmup) and returns: unknown, unknown