code: def _unflatten(list_, lengths):
      assert len(list_) == sum(lengths)
      i = 0
      ret = []
      for l in lengths:
          ret.append(list_[i : i + l])
          i += l
      return ret
  
imports: from abc import ABC, abstractmethod
  from typing import Dict, List
  import torch
  import torchaudio.functional
  from torch import Tensor
  from torchaudio.functional import TokenSpan
label_desc: Use image node_id 2 for calling a global function with example usage: _unflatten(list_, lengths) and returns: ret