code: def test_issue3468():
      """Test that sentence boundaries are set correctly so Doc.has_annotation("SENT_START") can
      be restored after serialization."""
      nlp = English()
      nlp.add_pipe("sentencizer")
      doc = nlp("Hello world")
      assert doc[0].is_sent_start
      assert doc.has_annotation("SENT_START")
      assert len(list(doc.sents)) == 1
      doc_bytes = doc.to_bytes()
      new_doc = Doc(nlp.vocab).from_bytes(doc_bytes)
      assert new_doc[0].is_sent_start
      assert new_doc.has_annotation("SENT_START")
      assert len(list(new_doc.sents)) == 1
  
imports: import copy
  import pickle
  import numpy
  import pytest
  from spacy.attrs import DEP, HEAD
  from spacy.lang.en import English
  from spacy.language import Language
  from spacy.matcher import Matcher, PhraseMatcher
  from spacy.tokens import Doc
  from spacy.vectors import Vectors
  from spacy.vocab import Vocab
  from ..util import make_tempdir
label_desc: Use image node_id 8 for calling a global function with example usage: test_issue3468() without return types