code: def cleanup(self):
      nni_log(LogType.Info, "%s: clean up trial" % self.name)
      self.process = None
      if self.log_pipe_stdout is not None:
          self.log_pipe_stdout.set_process_exit()
          self.log_pipe_stdout = None
      if self.trial_syslogger_stdout is not None:
          self.trial_syslogger_stdout.close()
          self.trial_syslogger_stdout = None
  
file_path: nni/nni/tools/trial_tool/trial.py
imports: import ctypes
  import os
  import sys
  import shlex
  import tarfile
  import time
  from datetime import datetime
  from subprocess import Popen
  import psutil
  from .log_utils import LogType, RemoteLogger, StdOutputType, nni_log
  from .commands import CommandType
label_desc: Use image node_id 6 for calling the Trial obj's underlying member method code with example usage: obj.cleanup() without return types