docstr: Read until the prompt is reached.
docstr_tok: ["Read","until","the","prompt","is","reached","."]
code: def _read_until(self, terminator):
      """Read until the prompt is reached."""
      buf = bytearray()
      while True:
          c = self._proc.stdout.read(1)
          if not c:
              raise _ConverterError(os.fsdecode(bytes(buf)))
          buf.extend(c)
          if buf.endswith(terminator):
              return bytes(buf)
  
imports: import atexit
  import functools
  import hashlib
  import logging
  import os
  from pathlib import Path
  import shutil
  import subprocess
  import sys
  from tempfile import TemporaryDirectory, TemporaryFile
  import weakref
  import numpy
  from PIL import Image
  import matplotlib
  from matplotlib import cbook
  from matplotlib.testing.exceptions import ImageComparisonFailure
label_desc: Use image node_id 3 for calling the _Converter obj's underlying member method code with example usage: obj._read_until(terminator) and returns: bytes