code: def dataset(tmp_path_factory):
      dataset_path = tmp_path_factory.mktemp("nkjp_dataset")
      sample_path = dataset_path / "sample"
      os.mkdir(sample_path)
      ann_path = sample_path / NER_FILE
      with open(ann_path, "w", encoding="utf-8") as fout:
          fout.write(SAMPLE_ANN)
      morph_path = sample_path / MORPH_FILE
      with open(morph_path, "w", encoding="utf-8") as fout:
          fout.write(SAMPLE_MORPHO)
      return dataset_path
  
file_path: stanza/stanza/tests/ner/test_convert_nkjp.py
imports: import pytest
  import io
  import os
  import xml.etree.ElementTree
  from stanza.utils.datasets.ner.convert_nkjp import MORPH_FILE, NER_FILE, extract_entities_from_subfolder, extract_entities_from_sentence, extract_unassigned_subfolder_entities
label_desc: Use image node_id 1 for calling a global function with example usage: dataset(tmp_path_factory) and returns: dataset_path