code: def trial_kill(args):
      """List trial"""
      experiments_config = Experiments()
      experiments_dict = experiments_config.get_all_experiments()
      experiment_id = get_config_filename(args)
      rest_port = experiments_dict.get(experiment_id).get("port")
      rest_pid = experiments_dict.get(experiment_id).get("pid")
      if not detect_process(rest_pid):
          print_error("Experiment is not running...")
          return
      running, _ = check_rest_server_quick(rest_port)
      if running:
          response = rest_delete(
              trial_job_id_url(rest_port, args.trial_id), REST_TIME_OUT
          )
          if response and check_response(response):
              print(response.text)
              return True
          else:
              print_error("Kill trial job failed...")
      else:
          print_error("Restful server is not running...")
      return False
  
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 12 for calling a global function with example usage: trial_kill(args) and returns: False, True