code: def main():
      parser = argparse.ArgumentParser()
      parser.add_argument(
          "--source-dir",
          type=str,
          default="data/assistant/NLU-Evaluation-Data-master",
      )
      parser.add_argument(
          "--nemo-format-dir",
          type=str,
          default="data/assistant/nemo-format",
      )
      parser.add_argument(
          "--output-dir", type=str, default="data/assistant"
      )
      parser.add_argument(
          "--save-name-base", type=str, default="assistant"
      )
      parser.add_argument("--make-ground-truth", action="store_true")
      parser.add_argument("--include-options", action="store_true")
      parser.add_argument("--random-seed", type=int, default=42)
      args = parser.parse_args()
  
      random.seed(args.random_seed)
      process_assistant(
          args.source_dir, args.nemo_format_dir, modes=["train", "test"]
      )
  
      intent_dict = open(
          f"{args.nemo_format_dir}/dict.intents.csv"
      ).readlines()
      slot_dict = open(
          f"{args.nemo_format_dir}/dict.slots.csv"
      ).readlines()
  
      # Convert train set to prompt learning format
      train_utterance_lines = open(
          f"{args.nemo_format_dir}/train.tsv"
      ).readlines()[1:]
      train_slot_lines = open(
          f"{args.nemo_format_dir}/train_slots.tsv"
      ).readlines()
      train_examples = list(
          zip(train_utterance_lines, train_slot_lines)
      )
  
      random.shuffle(train_examples)
      train_utterance_lines, train_slot_lines = zip(*train_examples)
      train_save_path = (
          f"{args.output_dir}/{args.save_name_base}_train.jsonl"
      )
  
      process_data_for_prompt_learning(
          train_utterance_lines,
          train_slot_lines,
          intent_dict,
          slot_dict,
          train_save_path,
          args.include_options,
      )
  
      # Split test set into validation and test sets
      test_utterance_lines = open(
          f"{args.nemo_format_dir}/test.tsv"
      ).readlines()[1:]
      test_slot_lines = open(
          f"{args.nemo_format_dir}/test_slots.tsv"
      ).readlines()
      val_half = len(test_utterance_lines) // 2
  
      test_examples = list(zip(test_utterance_lines, test_slot_lines))
      random.shuffle(test_examples)
      test_utterance_lines, test_slot_lines = zip(*test_examples)
  
      # Convert val set to prompt learning format
      val_utterance_lines = test_utterance_lines[:val_half]
      val_slot_lines = test_slot_lines[:val_half]
      val_save_path = (
          f"{args.output_dir}/{args.save_name_base}_val.jsonl"
      )
  
      process_data_for_prompt_learning(
          val_utterance_lines,
          val_slot_lines,
          intent_dict,
          slot_dict,
          val_save_path,
          args.include_options,
      )
  
      # Convert test set to prompt learning format
      test_utterance_lines = test_utterance_lines[val_half:]
      test_slot_lines = test_slot_lines[val_half:]
      test_save_path = (
          f"{args.output_dir}/{args.save_name_base}_test.jsonl"
      )
  
      process_data_for_prompt_learning(
          test_utterance_lines,
          test_slot_lines,
          intent_dict,
          slot_dict,
          test_save_path,
          args.include_options,
          make_ground_truth=args.make_ground_truth,
      )
  
imports: import argparse
  import json
  import random
  from assistant_utils import process_assistant
  from tqdm import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types