code: def test_pretokenized_multidoc():
      nlp = stanza.Pipeline(
          **{
              "processors": "tokenize",
              "dir": TEST_MODELS_DIR,
              "lang": "en",
              "tokenize_pretokenized": True,
          }
      )
      doc = nlp(EN_DOC_PRETOKENIZED)
      assert EN_DOC_PRETOKENIZED_GOLD_TOKENS == "\n\n".join(
          [sent.tokens_string() for sent in doc.sentences]
      )
      assert all(
          [
              doc.text[token._start_char : token._end_char]
              == token.text
              for sent in doc.sentences
              for token in sent.tokens
          ]
      )
      doc = nlp([stanza.Document([], text=EN_DOC_PRETOKENIZED_LIST)])[0]
      assert EN_DOC_PRETOKENIZED_LIST_GOLD_TOKENS == "\n\n".join(
          [sent.tokens_string() for sent in doc.sentences]
      )
      assert all(
          [
              doc.text[token._start_char : token._end_char]
              == token.text
              for sent in doc.sentences
              for token in sent.tokens
          ]
      )
  
imports: import pytest
  import stanza
  from stanza.tests import *
label_desc: Use image node_id 4 for calling a global function with example usage: test_pretokenized_multidoc() without return types