code: def test_set_max_len():
      nlp = stanza.Pipeline(
          **{
              "processors": "tokenize",
              "dir": TEST_MODELS_DIR,
              "lang": "en",
              "download_method": None,
              "tokenize_max_seqlen": 20,
          }
      )
      doc = nlp("This is a doc withaverylongtokenthatshouldbereplaced")
      assert len(doc.sentences) == 1
      assert len(doc.sentences[0].words) == 5
      assert (
          doc.sentences[0].words[-1].text
          == tokenize_processor.TOKEN_TOO_LONG_REPLACEMENT
      )
  
imports: import pytest
  import stanza
  from stanza.pipeline import tokenize_processor
  from stanza.tests import TEST_MODELS_DIR
label_desc: Use image node_id 2 for calling a global function with example usage: test_set_max_len() without return types