code: def stream(
      self,
      command: str,
      *,
      log_dir: Path,
      ui_mode: UIMode = UIMode.dots,
      is_silent=True,
  ):
      with monit.section(f"Exec: {command}", is_silent=is_silent):
          thread = ExecutorThread(
              command, log_dir=log_dir, ui_mode=ui_mode
          )
          thread.start()
          thread.join()
          if thread.exit_code != 0:
              monit.fail()
  
          return thread.exit_code
  
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 3 for calling the LocalExecutor obj's underlying member method code with example usage: obj.stream(command) and returns: thread