code: def test_spans_span_sent_user_hooks(
      doc, start, end, expected_sentence
  ):
      # Doc-level sents hook
      def user_hook(doc):
          return [doc[ii : ii + 2] for ii in range(0, len(doc), 2)]
  
      doc.user_hooks["sents"] = user_hook
  
      # Make sure doc-level sents hook works
      assert doc[start:end].sent.text == expected_sentence
  
      # Span-level sent hook
      doc.user_span_hooks["sent"] = lambda x: x
      # Now, span=level sent hook overrides the doc-level sents hook
      assert doc[start:end].sent == doc[start:end]
  
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 18 for calling a global function with example usage: test_spans_span_sent_user_hooks(doc, start, end, expected_sentence) and returns: unknown