class_docstr: Iterator Pipe creates an iterator that can be fed in data from another block of code or thread of execution
docstr: Close is idempotent. Calling close multiple times is safe
  Iterator will raise StopIteration only after all elements pushed before close have been iterated
docstr_tok: ["Close","is","idempotent",".","Calling","close","multiple","times","is","safe","Iterator","will","raise","StopIteration","only","after","all","elements","pushed","before","close","have","been","iterated"]
code: def close(self):
      """
      Close is idempotent. Calling close multiple times is safe
      Iterator will raise StopIteration only after all elements pushed before close have been iterated
      """
      # make close idempotent
      if not self._sentinel_pushed:
          self._sentinel_pushed = True
      self._q.put(self._sentinel)
  
file_path: h2ogpt/iterators/iterator_pipe.py
imports: import queue
  import asyncio
label_desc: Use image node_id 5 for calling the IteratorPipe obj's underlying member method code with example usage: obj.close() without return types