code: def test_knp_doc_getter(nlp: Language):
      text = "太郎がリンゴとみかんを食べた。二郎は何も食べなかったので腹が減った"
      doc = nlp(text)
      for obj in [TAG, BUNSETSU]:
          for feature in ["list_", "spans"]:
              key = getattr(KNP_USER_KEYS, obj)
              key = getattr(key, feature)
              assert list(doc._.get(key)) == list(
                  itertools.chain.from_iterable(
                      sent._.get(key) for sent in doc.sents
                  )
              )
  
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 7 for calling a global function with example usage: test_knp_doc_getter(nlp) without return types