code: def __get_vocab(data_folder: str, des_dir: str):
      """
      To generate the vocabulary file
      Args:
          data_folder: source with the transcript file
          dst_folder: where the file will be stored
      Returns:
      """
      if not os.path.exists(des_dir):
          os.makedirs(des_dir)
      trans_file = os.path.join(
          data_folder, "transcript", "train", "trans.txt"
      )
      vocab_dict = {}
      with open(trans_file, "r", encoding="utf-8") as f:
          for line in f:
              line = line.strip().split()
              text = " ".join(line[1:])
              for i in text.upper():
                  if i in vocab_dict:
                      vocab_dict[i] += 1
                  else:
                      vocab_dict[i] = 1
      vocab_dict = sorted(
          vocab_dict.items(), key=lambda k: k[1], reverse=True
      )
      vocab = os.path.join(des_dir, "vocab.txt")
      vocab = open(vocab, "w", encoding="utf-8")
      for k in vocab_dict:
          vocab.write(k[0] + "\n")
      vocab.close()
  
imports: import argparse
  import json
  import os
  import subprocess
label_desc: Use image node_id 2 for calling a global function with example usage: __get_vocab(data_folder, des_dir) without return types