code: def generate_artifacts():
      global artifacts_generated
      if not artifacts_generated:
          shutil.rmtree("artifacts", ignore_errors=True)
          Path("artifacts").mkdir()
      else:
          return
      random.seed(19)
  
      artifacts_generated = True
  
      n_lines = 10000
      n_characters = 100
  
      for file_name, alphabet in zip(
          [TRAIN_FILE, TEST_FILE], ["abcd ", "abcde "]
      ):
          with open(file_name, "w") as fout:
              for _ in range(n_lines):
                  random_line = "".join(
                      [
                          random.choice(alphabet)
                          for _ in range(n_characters)
                      ]
                  )
                  print(random_line, file=fout)
  
      cmd_args = [
          "yttm",
          "bpe",
          f"--data={TRAIN_FILE}",
          f"--model={BASE_MODEL_FILE}",
          "--vocab_size=16000",
          "--coverage=0.999",
          f"--bos_id={BOS_ID}",
          f"--eos_id={EOS_ID}",
      ]
  
      run(cmd_args, check=True)
      cmd_args = [
          "yttm",
          "bpe",
          f"--data={TRAIN_FILE}",
          f"--model={RENAME_ID_MODEL_FILE}",
          "--vocab_size=16000",
          "--coverage=0.999",
          "--bos_id=29",
          "--eos_id=1148",
          "--unk_id=2922",
      ]
      run(cmd_args, check=True)
  
imports: import random
  import shutil
  from pathlib import Path
  from subprocess import run
label_desc: Use image node_id 1 for calling a global function with example usage: generate_artifacts() without return types