code: def copy_grad_from_paras(para_list):
      res = []
      for para in para_list:
          if para.grad is not None:
              grad = para.grad.data.clone().detach().contiguous()
          else:
              grad = torch.zeros_like(para)
          res.append(grad)
      return res
  
imports: import random
  import time
  from collections import OrderedDict
  import numpy
  import torch
label_desc: Use image node_id 6 for calling a global function with example usage: copy_grad_from_paras(para_list) and returns: res