code: def iter_window(g, window_size):
      
      values = collections.deque(maxlen=window_size)
      for value in g:
          values.append(value)
          if len(values) == window_size:
              yield list(values)
docs: interate over 'g' bit-by-bit and yield a window with the given 'window_size' width.
  
      >>> for v in iter_window([1,2,3,4], window_size=2): v
      [1, 2]
      [2, 3]
      [3, 4]
      >>> for v in iter_window([1,2,3,4,5], window_size=3): v
      [1, 2, 3]
      [2, 3, 4]
      [3, 4, 5]
  
      >>> for v in iter_window([1,2,3,4], window_size=2):
      ...    v
      ...    v.append(True)
      [1, 2]
      [2, 3]
      [3, 4]