code: def calc_offset(sizes):
      offsets = [0]
      tmp = 0
      for x in sizes:
          tmp += x
          offsets.append(tmp)
      return offsets
  
file_path: lightseq/lightseq/training/ops/pytorch/util.py
imports: import math
  from typing import Callable
  import numpy
  import torch
  import torch.nn.functional
label_desc: Use image node_id 7 for calling a global function with example usage: calc_offset(sizes) and returns: offsets