code: def _read(self, stream: IO, path: Path, is_err: bool):
      if not stream.readable():
          return
  
      with open(str(path), "ab") as f:
          while stream.readable():
              data = stream.read(1024)
              if len(data) == 0:
                  break
              f.write(data)
              self.ui_mode.on_bytes(data, is_err=is_err)
  
file_path: labml/remote/labml_remote/execute/local.py
imports: import subprocess
  import threading
  import time
  from pathlib import Path
  from typing.io import IO
  from labml import monit
  from labml_remote.execute import UIMode
label_desc: Use image node_id 2 for calling the ExecutorThread obj's underlying member method code with example usage: obj._read(stream, path, is_err) without return types