code: def split_train_file(
      treebank,
      train_input_conllu,
      train_output_conllu,
      dev_output_conllu,
  ):
      # set the seed for each data file so that the results are the same
      # regardless of how many treebanks are processed at once
      random.seed(1234)
  
      # read and shuffle conllu data
      sents = read_sentences_from_conllu(train_input_conllu)
      random.shuffle(sents)
      n_dev = int(len(sents) * XV_RATIO)
      assert n_dev >= 1, "Dev sentence number less than one."
      n_train = len(sents) - n_dev
  
      # split conllu data
      dev_sents = sents[:n_dev]
      train_sents = sents[n_dev:]
      print(
          "Train/dev split not present.  Randomly splitting train file from %s to %s and %s"
          % (train_input_conllu, train_output_conllu, dev_output_conllu)
      )
      print(
          f"{len(sents)} total sentences found: {n_train} in train, {n_dev} in dev"
      )
  
      # write conllu
      write_sentences_to_conllu(train_output_conllu, train_sents)
      write_sentences_to_conllu(dev_output_conllu, dev_sents)
  
      return True
  
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 3 for calling a global function with example usage: split_train_file(treebank, train_input_conllu, train_output_conllu, dev_output_conllu) and returns: True