code: def test_set_tokens(doc):
      """
      Test setting values on tokens
      """
      ner_contents = ["O", "ARTIFACT", "ARTIFACT", "O", "CAT"]
      doc.set(fields=NER, contents=ner_contents, to_token=True)
  
      result = doc.get(NER, from_token=True)
      assert result == ner_contents
  
file_path: stanza/stanza/tests/common/test_doc.py
imports: import pytest
  import stanza
  from stanza.tests import *
  from stanza.models.common.doc import Document, ID, TEXT, NER, CONSTITUENCY, SENTIMENT
label_desc: Use image node_id 5 for calling a global function with example usage: test_set_tokens(doc) without return types