class_docstr: Async version of TimeoutIterator. See method documentation of TimeoutIterator
class_docstr_tok: ["Async","version","of","TimeoutIterator",".","See","method","documentation","of","TimeoutIterator"]
code: def __init__(
      self,
      iterator,
      timeout=0.0,
      sentinel=object(),
      reset_on_next=False,
  ):
      self._iterator = iterator
      self._timeout = timeout
      self._sentinel = sentinel
      self._reset_on_next = reset_on_next
  
      self._interrupt = False
      self._done = False
      self._buffer = asyncio.Queue()
      self._task = asyncio.get_event_loop().create_task(
          self.__lookahead()
      )
  
file_path: h2ogpt/iterators/timeout_iterator.py
imports: import queue
  import asyncio
  import threading
  import traceback
label_desc: Use image node_id 1 to create a new AsyncTimeoutIterator object  with example: obj = AsyncTimeoutIterator(iterator, timeout, sentinel, reset_on_next)