code: def test_extract_entities_from_subfolder(dataset):
      entities = extract_entities_from_subfolder("sample", dataset)
      assert len(entities) == 1
      assert len(entities["1-p"]) == 1
      assert len(entities["1-p"]["1.39-s"]) == 39
      assert entities["1-p"]["1.39-s"]["1.1-seg"] == EXPECTED_TOKENS[0]
      assert entities["1-p"]["1.39-s"]["1.37-seg"] == EXPECTED_TOKENS[1]
      assert entities["1-p"]["1.39-s"]["1.38-seg"] == EXPECTED_TOKENS[2]
  
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 2 for calling a global function with example usage: test_extract_entities_from_subfolder(dataset) without return types