docstr: Long writes that might fail need to be broken into smaller chunks
  that can be retried. WriteBuffer stores data at the end of
  the write stream that has not been committed and may be needed
  to retry the failed write of a chunk.
docstr_tok: ["Long","writes","that","might","fail","need","to","be","broken","into","smaller","chunks","that","can","be","retried",".","WriteBuffer","stores","data","at","the","end","of","the","write","stream","that","has","not","been","committed","and","may","be","needed","to","retry","the","failed","write","of","a","chunk","."]
code: def __init__(self):
      """Long writes that might fail need to be broken into smaller chunks
      that can be retried. WriteBuffer stores data at the end of
      the write stream that has not been committed and may be needed
      to retry the failed write of a chunk."""
      self._buffers: Deque[bytes] = collections.deque()
      self._offset = 0
      self._size = 0
      self._iterating = False
  
file_path: hail/hail/python/hailtop/aiotools/utils.py
imports: from typing import Deque, TypeVar, AsyncIterator, Iterator
  import collections
  from contextlib import contextmanager
  import asyncio
label_desc: Use image node_id 1 to create a new WriteBuffer object  with example: obj = WriteBuffer()