code: def _unflatten(flat: FlatT[ItemT], lens: List[int]) -> NestedT[ItemT]:
      nested = []
      for l in lens:
          nested.append(flat[:l])
          flat = flat[l:]
      return nested
  
imports: from typing import Any, Callable, List, Optional, Sequence, Tuple, TypeVar, cast
  from ..config import registry
  from ..model import Model
label_desc: Use image node_id 4 for calling a global function with example usage: _unflatten(flat, lens) and returns: nested