code: def build_combined_korean_dataset(
      udbase_dir, tokenizer_dir, short_name, dataset, output_conllu
  ):
      """
      Builds a combined dataset out of multiple Korean datasets.
  
      Currently this uses GSD and Kaist.  If a segmenter-appropriate
      dataset was requested, spaces are removed.
  
      TODO: we need to handle the difference in xpos tags somehow.
      """
      gsd_conllu = common.find_treebank_dataset_file(
          "UD_Korean-GSD", udbase_dir, dataset, "conllu"
      )
      kaist_conllu = common.find_treebank_dataset_file(
          "UD_Korean-Kaist", udbase_dir, dataset, "conllu"
      )
      sents = read_sentences_from_conllu(
          gsd_conllu
      ) + read_sentences_from_conllu(kaist_conllu)
  
      segmenter = short_name.endswith("_seg")
      if segmenter:
          sents = remove_spaces_from_sentences(sents)
  
      write_sentences_to_conllu(output_conllu, sents)
  
imports: import argparse
  import glob
  import os
  import random
  import re
  import tempfile
  from collections import Counter
  from stanza.models.common.constant import treebank_to_short_name
  import stanza.utils.datasets.common
  from stanza.utils.datasets.common import read_sentences_from_conllu, write_sentences_to_conllu, INT_RE, MWT_RE, MWT_OR_COPY_RE
  import stanza.utils.datasets.tokenization.convert_ml_cochin
  import stanza.utils.datasets.tokenization.convert_my_alt
  import stanza.utils.datasets.tokenization.convert_vi_vlsp
  import stanza.utils.datasets.tokenization.convert_th_best
  import stanza.utils.datasets.tokenization.convert_th_lst20
  import stanza.utils.datasets.tokenization.convert_th_orchid
label_desc: Use image node_id 22 for calling a global function with example usage: build_combined_korean_dataset(udbase_dir, tokenizer_dir, short_name, dataset, output_conllu) without return types