code: def experiment_clean(args):
      """clean up the experiment data"""
      experiment_id_list = []
      experiments_config = Experiments()
      experiments_dict = experiments_config.get_all_experiments()
      if args.all:
          experiment_id_list = list(experiments_dict.keys())
      else:
          if args.id is None:
              print_error("please set experiment id.")
              exit(1)
          if args.id not in experiments_dict:
              print_error("Cannot find experiment {0}.".format(args.id))
              exit(1)
          experiment_id_list.append(args.id)
      while True:
          print(
              "INFO: This action will delete experiment {0}, and it's not recoverable.".format(
                  " ".join(experiment_id_list)
              )
          )
          inputs = input("INFO: do you want to continue?[y/N]:")
          if not inputs.lower() or inputs.lower() in ["n", "no"]:
              exit(0)
          elif inputs.lower() not in ["y", "n", "yes", "no"]:
              print_warning("please input Y or N.")
          else:
              break
      for experiment_id in experiment_id_list:
          experiment_id = get_config_filename(args)
          experiment_config = Config(
              experiment_id,
              Experiments().get_all_experiments()[experiment_id][
                  "logDir"
              ],
          ).get_config()
          platform = experiment_config.get(
              "trainingServicePlatform"
          ) or experiment_config.get("trainingService", {}).get(
              "platform"
          )
          if platform == "remote":
              machine_list = experiment_config.get("machineList")
              remote_clean(machine_list, experiment_id)
          elif platform != "local":
              # TODO: support all platforms
              print_warning(
                  "platform {0} clean up not supported yet.".format(
                      platform
                  )
              )
              exit(0)
          # clean local data
          local_base_dir = experiments_config.experiments[
              experiment_id
          ]["logDir"]
          if not local_base_dir:
              local_base_dir = NNI_HOME_DIR
          local_experiment_dir = os.path.join(
              local_base_dir, experiment_id
          )
          experiment_folder_name_list = [
              "checkpoint",
              "db",
              "log",
              "trials",
          ]
          for folder_name in experiment_folder_name_list:
              local_clean(
                  os.path.join(local_experiment_dir, folder_name)
              )
          if not os.listdir(local_experiment_dir):
              local_clean(local_experiment_dir)
          print_normal(
              "removing metadata of experiment {0}".format(
                  experiment_id
              )
          )
          experiments_config.remove_experiment(experiment_id)
          print_normal("Done.")
  
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 24 for calling a global function with example usage: experiment_clean(args) without return types