code: def test_knp_span_getter(nlp: Language, text: str):
      doc: Doc = nlp(text)
      for _ in range(2):  # loop 2 times to validate cache
          for sent in doc.sents:
              blist = sent._.get(KNP_USER_KEYS.bunsetsu.list_)
              text = "".join(b.midasi for b in blist)
              assert text == sent.text
              assert all(
                  [
                      b.midasi == s.text
                      for b, s in itertools.zip_longest(
                          blist,
                          sent._.get(KNP_USER_KEYS.bunsetsu.spans),
                      )
                  ]
              )
              assert all(
                  [
                      t.midasi == s.text
                      for t, s in itertools.zip_longest(
                          blist.tag_list(),
                          sent._.get(KNP_USER_KEYS.tag.spans),
                      )
                  ]
              )
  
file_path: camphr/packages/camphr_knp/tests/test_knp.py
imports: from camphr_knp import create_knp_nlp
  import itertools
  from typing import List, Tuple
  import pytest
  from spacy.language import Language
  from spacy.tokens import Doc
  from camphr_knp import BUNSETSU, KNP_USER_KEYS, TAG
  from .utils import check_knp
label_desc: Use image node_id 3 for calling a global function with example usage: test_knp_span_getter(nlp, text) without return types