code: def test_pythainlp():
      nlp = stanza.Pipeline(
          lang="th",
          dir=TEST_MODELS_DIR,
          processors={"tokenize": "pythainlp"},
          package=None,
      )
      doc = nlp(TH_DOC)
      assert (
          "PyThaiNLPTokenizer"
          == nlp.processors["tokenize"]._variant.__class__.__name__
      )
      assert TH_DOC_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 18 for calling a global function with example usage: test_pythainlp() without return types