code: def log_trial_adl_helper(args, experiment_id):
      # adljob_id format should be consistent to the one in "adlTrainingService.ts":
      #   const adlJobName: string = `nni-exp-${this.experimentId}-trial-${trialJobId}`.toLowerCase();
      adlJobName = "nni-exp-{}-trial-{}".format(
          experiment_id, args.trial_id
      ).lower()
      print_warning(
          "Note that no log will show when trial is pending or done (succeeded or failed). "
          "You can retry the command."
      )
      print_green(">>> Trial log streaming:")
      try:
          subprocess.run(
              [
                  "kubectl",
                  "logs",
                  "-l",
                  "adaptdl/job=%s" % adlJobName,
                  "-f",  # Follow the stream
              ],  # TODO: support remaining argument, uncomment the lines in nnictl.py
          )  # TODO: emulate tee behaviors, not necessary tho.
      except KeyboardInterrupt:
          pass
      except Exception:
          print_error("Error! Please check kubectl:")
          traceback.print_exc()
          exit(1)
      finally:
          print_green("<<< [adlJobName:%s]" % adlJobName)
          nni_manager_collection_path = os.path.expanduser(
              "~/nni-experiments/%s/trials/%s/stdout_log_collection.log"
              % (experiment_id, args.trial_id)
          )
          print_green(
              ">>> (Optional) How to persist the complete trial log locally:"
          )
          print(
              "Please ensure `logCollection: http` "
              "exists in the experiment configuration yaml. "
              "After trial done, you can check it from the file below: \n  %s"
              % nni_manager_collection_path
          )
  
imports: import csv
  import os
  import sys
  import json
  import time
  import shutil
  import subprocess
  from functools import cmp_to_key
  import traceback
  from datetime import datetime, timezone
  from subprocess import Popen
  from .rest_utils import rest_get, rest_delete, check_rest_server_quick, check_response
  from .url_utils import trial_jobs_url, experiment_url, trial_job_id_url, export_data_url, metric_data_url
  from .config_utils import Config, Experiments
  from .constants import NNI_HOME_DIR, EXPERIMENT_INFORMATION_FORMAT, EXPERIMENT_DETAIL_FORMAT, EXPERIMENT_MONITOR_INFO, TRIAL_MONITOR_HEAD, TRIAL_MONITOR_CONTENT, TRIAL_MONITOR_TAIL, REST_TIME_OUT
  from .common_utils import print_normal, print_error, print_warning, detect_process, get_yml_content, generate_temp_dir
  from .common_utils import print_green
  from .command_utils import check_output_command, kill_command
  from .ssh_utils import create_ssh_sftp_client, remove_remote_directory
label_desc: Use image node_id 18 for calling a global function with example usage: log_trial_adl_helper(args, experiment_id) without return types