code: def __init__(self, args, data):
      self.process = None
      self.data = data
      self.args = args
      self.command_channel = args.command_channel
      self.trial_syslogger_stdout = None
  
      global NNI_TRIAL_JOB_ID
      self.id = data["trialId"]
      if self.id is None:
          raise Exception("trial_id is not found in %s" % data)
      os.environ["NNI_TRIAL_JOB_ID"] = self.id
      NNI_TRIAL_JOB_ID = self.id
  
      # for multiple nodes. If it's None, it means single node.
      self.node_id = args.node_id
      if self.node_id is None:
          self.name = self.id
      else:
          self.name = "%s_%s" % (self.id, self.node_id)
  
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 1 to create a new Trial object  with example: obj = Trial(args, data)