code: def test_doc_api_set_ents(en_tokenizer):
      text = "I use goggle chrone to surf the web"
      tokens = en_tokenizer(text)
      assert len(tokens.ents) == 0
      tokens.ents = [(tokens.vocab.strings["PRODUCT"], 2, 4)]
      assert len(list(tokens.ents)) == 1
      assert [t.ent_iob for t in tokens] == [2, 2, 3, 1, 2, 2, 2, 2]
      assert tokens.ents[0].label_ == "PRODUCT"
      assert tokens.ents[0].start == 2
      assert tokens.ents[0].end == 4
  
imports: import warnings
  import weakref
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from thinc.api import NumpyOps, get_current_ops
  from spacy.attrs import DEP, ENT_IOB, ENT_TYPE, HEAD, IS_ALPHA, MORPH, POS, SENT_START, TAG
  from spacy.lang.en import English
  from spacy.lang.xx import MultiLanguage
  from spacy.language import Language
  from spacy.lexeme import Lexeme
  from spacy.tokens import Doc, Span, SpanGroup, Token
  from spacy.vocab import Vocab
  from .test_underscore import clean_underscore
label_desc: Use image node_id 15 for calling a global function with example usage: test_doc_api_set_ents(en_tokenizer) without return types