code: def eval(
      self, command: str, *, log_dir: Optional[Path], is_silent=True
  ) -> EvalResult:
      with monit.section(f"Exec: {command}", is_silent=is_silent):
          stdin, stdout, stderr = self.client.exec_command(command)
          out = stdout.read()
          err = stderr.read()
          exit_code = stdout.channel.recv_exit_status()
          if log_dir:
              with open(str(log_dir / "stdout.log"), "wb") as f:
                  f.write(out)
              with open(str(log_dir / "stderr.log"), "wb") as f:
                  f.write(err)
              with open(str(log_dir / "exit_code"), "w") as f:
                  f.write(str(exit_code))
  
          if exit_code != 0:
              monit.fail()
  
          return EvalResult(
              exit_code,
              out.decode("utf-8").strip(),
              err.decode("utf-8").strip(),
          )
  
file_path: labml/remote/labml_remote/execute/remote.py
imports: import threading
  import time
  from pathlib import Path
  from typing import NamedTuple, Optional
  from paramiko import SSHClient
  from labml import monit
  from labml_remote.execute import UIMode
label_desc: Use image node_id 2 for calling the RemoteExecutor obj's underlying member method code with example usage: obj.eval(command) and returns: EvalResult