code: def read_datasets(in_directory):
      """
      Reads & splits the train data, reads the test data
  
      There is no validation data, so we split the training data into
      two pieces and use the smaller piece as the dev set
  
      Also performeed is a conversion of TIM -> B-TIM, I-TIM
      """
      # make sure we always get the same shuffle & split
      random.seed(1234)
  
      train_file = os.path.join(in_directory, "Input", "train_data.txt")
      with tempfile.TemporaryDirectory() as tempdir:
          train_filtered_file = os.path.join(tempdir, "train.txt")
          filter_blank_words(train_file, train_filtered_file)
          train_sentences = read_tsv(
              train_filtered_file,
              text_column=0,
              annotation_column=1,
              keep_broken_tags=True,
          )
      train_sentences = filter_broken_tags(train_sentences)
      train_sentences = filter_bad_words(train_sentences)
      train_sentences = redo_time_tags(train_sentences)
      train_sentences = strip_words(train_sentences)
  
      test_file = os.path.join(in_directory, "Input", "test_data.txt")
      test_sentences = read_tsv(
          test_file,
          text_column=0,
          annotation_column=1,
          keep_broken_tags=True,
      )
      test_sentences = filter_broken_tags(test_sentences)
      test_sentences = filter_bad_words(test_sentences)
      test_sentences = redo_time_tags(test_sentences)
      test_sentences = strip_words(test_sentences)
  
      random.shuffle(train_sentences)
      split_len = len(train_sentences) * 9 // 10
      dev_sentences = train_sentences[split_len:]
      train_sentences = train_sentences[:split_len]
  
      datasets = (train_sentences, dev_sentences, test_sentences)
      return datasets
  
file_path: stanza/stanza/utils/datasets/ner/convert_bn_daffodil.py
imports: import argparse
  import os
  import random
  import tempfile
  from stanza.utils.datasets.ner.utils import read_tsv, write_dataset
label_desc: Use image node_id 6 for calling a global function with example usage: read_datasets(in_directory) and returns: datasets