docstr: Tokenize a document with the spaCy tokenizer and wrap the results into a Doc object.
          
docstr_tok: ["Tokenize","a","document","with","the","spaCy","tokenizer","and","wrap","the","results","into","a","Doc","object","."]
code: def process(self, document):
      """Tokenize a document with the spaCy tokenizer and wrap the results into a Doc object."""
      if isinstance(document, doc.Document):
          text = document.text
      else:
          text = document
      if not isinstance(text, str):
          raise Exception(
              "Must supply a string or Stanza Document object to the spaCy tokenizer."
          )
      spacy_doc = self.nlp(text)
  
      sentences = []
      for sent in spacy_doc.sents:
          tokens = []
          for tok in sent:
              token_entry = {
                  doc.TEXT: tok.text,
                  doc.MISC: f"{doc.START_CHAR}={tok.idx}|{doc.END_CHAR}={tok.idx+len(tok.text)}",
              }
              tokens.append(token_entry)
          sentences.append(tokens)
  
      # if no_ssplit is set, flatten all the sentences into one sentence
      if self.no_ssplit:
          sentences = [[t for s in sentences for t in s]]
  
      return doc.Document(sentences, text)
  
imports: from stanza.models.common import doc
  from stanza.pipeline._constants import TOKENIZE
  from stanza.pipeline.processor import ProcessorVariant, register_processor_variant
label_desc: Use image node_id 2 for calling the SpacyTokenizer obj's underlying member method code with example usage: obj.process(document) and returns: doc