code: def run_split_wikiner(
      expected_train=14, expected_dev=3, expected_test=3, **kwargs
  ):
      """
      Runs a test using various parameters to check the results of the splitting process
      """
      with tempfile.TemporaryDirectory() as indir:
          raw_filename = os.path.join(indir, "raw.tsv")
          with open(raw_filename, "w") as fout:
              fout.write(FBK_SAMPLE)
  
          with tempfile.TemporaryDirectory() as outdir:
              split_wikiner.split_wikiner(
                  outdir, raw_filename, **kwargs
              )
  
              train_file = os.path.join(outdir, "it_fbk.train.bio")
              dev_file = os.path.join(outdir, "it_fbk.dev.bio")
              test_file = os.path.join(outdir, "it_fbk.test.bio")
  
              assert os.path.exists(train_file)
              assert os.path.exists(dev_file)
              if kwargs["test_section"]:
                  assert os.path.exists(test_file)
              else:
                  assert not os.path.exists(test_file)
  
              train_sent = split_wikiner.read_sentences(
                  train_file, "utf-8"
              )
              dev_sent = split_wikiner.read_sentences(dev_file, "utf-8")
              assert len(train_sent) == expected_train
              assert len(dev_sent) == expected_dev
              if kwargs["test_section"]:
                  test_sent = split_wikiner.read_sentences(
                      test_file, "utf-8"
                  )
                  assert len(test_sent) == expected_test
              else:
                  test_sent = []
  
              if kwargs["shuffle"]:
                  orig_sents = sorted(
                      split_wikiner.read_sentences(
                          raw_filename, "utf-8"
                      )
                  )
                  split_sents = sorted(
                      train_sent + dev_sent + test_sent
                  )
              else:
                  orig_sents = split_wikiner.read_sentences(
                      raw_filename, "utf-8"
                  )
                  split_sents = train_sent + dev_sent + test_sent
              assert orig_sents == split_sents
  
file_path: stanza/stanza/tests/ner/test_split_wikiner.py
imports: import os
  import tempfile
  import pytest
  from stanza.utils.datasets.ner import split_wikiner
  from stanza.tests import *
label_desc: Use image node_id 3 for calling a global function with example usage: run_split_wikiner(expected_train, expected_dev, expected_test) without return types