code: def split_custom_layer_grad(layer):
      res = []
      for i in range(1, len(layer.para_offset)):
          lidx, ridx = layer.para_offset[i - 1], layer.para_offset[i]
          cur_grad = layer.para.grad.data[lidx:ridx].clone().detach()
          res.append(cur_grad.contiguous())
      return res
  
imports: import random
  import time
  from collections import OrderedDict
  import numpy
  import torch
label_desc: Use image node_id 5 for calling a global function with example usage: split_custom_layer_grad(layer) and returns: res