code: def run_test_case(test_case_config, it_config, args):
      new_config_file = prepare_config_file(
          test_case_config, it_config, args
      )
      # set configFile variable
      it_variables["$configFile"] = new_config_file
  
      try:
          launch_test(new_config_file, args.ts, test_case_config)
          invoke_validator(
              test_case_config, args.nni_source_dir, args.ts
          )
      finally:
          stop_command = get_command(test_case_config, "stopCommand")
          print("Stop command:", stop_command, flush=True)
          if stop_command:
              subprocess.run(stop_command, shell=True)
          exit_command = get_command(test_case_config, "onExitCommand")
          print("Exit command:", exit_command, flush=True)
          if exit_command:
              subprocess.run(exit_command, shell=True, check=True)
          # remove tmp config file
          if os.path.exists(new_config_file):
              os.remove(new_config_file)
  
imports: import argparse
  import datetime
  import json
  import os
  import subprocess
  import sys
  import time
  import yaml
  import validators
  from utils import CLEAR, EXPERIMENT_URL, GREEN, RED, REST_ENDPOINT, STATUS_URL, TRIAL_JOBS_URL, deep_update, dump_yml_content, get_experiment_dir, get_experiment_id, get_experiment_status, get_failed_trial_jobs, get_trial_stats, get_yml_content, parse_max_duration_time, print_experiment_log, print_trial_job_log, wait_for_port_available
label_desc: Use image node_id 3 for calling a global function with example usage: run_test_case(test_case_config, it_config, args) without return types