code: def test_spans_root2(en_tokenizer):
      text = "through North and South Carolina"
      heads = [0, 4, 1, 1, 0]
      deps = ["dep"] * len(heads)
      tokens = en_tokenizer(text)
      doc = Doc(
          tokens.vocab,
          words=[t.text for t in tokens],
          heads=heads,
          deps=deps,
      )
      assert doc[-2:].root.text == "Carolina"
  
imports: import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from thinc.api import get_current_ops
  from spacy.attrs import LENGTH, ORTH
  from spacy.lang.en import English
  from spacy.tokens import Doc, Span, Token
  from spacy.util import filter_spans
  from spacy.vocab import Vocab
  from ..util import add_vecs_to_vocab
  from .test_underscore import clean_underscore
label_desc: Use image node_id 16 for calling a global function with example usage: test_spans_root2(en_tokenizer) without return types