code: def convert(input_dir, output_dir, args):
      input_dir = os.path.join(input_dir, "thai", "LST20_Corpus")
      if not os.path.exists(input_dir):
          raise FileNotFoundError(
              "Could not find LST20 corpus in {}".format(input_dir)
          )
  
      for in_section, out_section in (
          ("train", "train"),
          ("eval", "dev"),
          ("test", "test"),
      ):
          print("Processing %s" % out_section)
          documents = read_data(
              input_dir,
              in_section,
              args.lst20_resegment,
              args.lst20_spaces_after,
              args.split_clauses,
          )
          print("  Read in %d documents" % len(documents))
          write_section(output_dir, "lst20", out_section, documents)
  
file_path: stanza/stanza/utils/datasets/tokenization/convert_th_lst20.py
imports: import argparse
  import glob
  import os
  import sys
  from stanza.utils.datasets.tokenization.process_thai_tokenization import write_section, convert_processed_lines, reprocess_lines
label_desc: Use image node_id 6 for calling a global function with example usage: convert(input_dir, output_dir, args) without return types