parameters: (self, flatiter)
return_statement: return res
docstring: Rebuild a nested tuple structure.
docstring_summary: Rebuild a nested tuple structure.
docstring_tokens: Rebuild a nested tuple structure .
function: def unflatten(self, flatiter):
          """Rebuild a nested tuple structure.
          """
          vals = deque(flatiter)
  
          res = []
          cur = res
          stack = []
          for op in self._code:
              if op is _PUSH_LIST:
                  stack.append(cur)
                  cur.append([])
                  cur = cur[-1]
              elif op is _APPEND_NEXT_VALUE:
                  cur.append(vals.popleft())
              elif op is _APPEND_EMPTY_TUPLE:
                  cur.append(())
              elif op is _POP:
                  cur = stack.pop()
  
          assert not stack, stack
          assert not vals, vals
  
          return res
function_tokens: def unflatten ( self , flatiter ) : vals = deque ( flatiter ) res = [ ] cur = res stack = [ ] for op in self . _code : if op is _PUSH_LIST : stack . append ( cur ) cur . append ( [ ] ) cur = cur [ - 1 ] elif op is _APPEND_NEXT_VALUE : cur . append ( vals . popleft ( ) ) elif op is _APPEND_EMPTY_TUPLE : cur . append ( ( ) ) elif op is _POP : cur = stack . pop ( ) assert not stack , stack assert not vals , vals return res