code: def train_test_dev_split(
      sents,
      base_output_path,
      short_name,
      train_fraction=0.7,
      dev_fraction=0.15,
  ):
      """
      Splits a list of sentences into training, dev, and test sets,
      and writes each set to a separate file with write_sentences_to_file
      """
      num = len(sents)
      train_num = int(num * train_fraction)
      dev_num = int(num * dev_fraction)
      if train_fraction + dev_fraction > 1.0:
          raise ValueError(
              "Train and dev fractions added up to more than 1: {} {} {}".format(
                  train_fraction, dev_fraction
              )
          )
  
      random.shuffle(sents)
      train_sents = sents[:train_num]
      dev_sents = sents[train_num : train_num + dev_num]
      test_sents = sents[train_num + dev_num :]
      batches = [train_sents, dev_sents, test_sents]
      filenames = [
          f"{short_name}.train.tsv",
          f"{short_name}.dev.tsv",
          f"{short_name}.test.tsv",
      ]
      for batch, filename in zip(batches, filenames):
          write_sentences_to_file(
              batch, os.path.join(base_output_path, filename)
          )
  
file_path: stanza/stanza/utils/datasets/ner/convert_hy_armtdp.py
imports: import argparse
  import os
  import json
  import re
  import stanza
  import random
  from tqdm import tqdm
  from stanza import DownloadMethod, Pipeline
  import stanza.utils.default_paths
label_desc: Use image node_id 7 for calling a global function with example usage: train_test_dev_split(sents, base_output_path, short_name, train_fraction, dev_fraction) without return types