code: def test_dictionary(zhtok):
      """
      Tests some features of the zh tokenizer dictionary
  
      The expectation is that the Chinese tokenizer will be serialized with a dictionary
      (if it ever gets serialized without, this test will warn us!)
      """
      assert zhtok.trainer.lexicon is not None
      assert zhtok.trainer.dictionary is not None
  
      assert "老师" in zhtok.trainer.lexicon
      # egg-white-stuff, eg protein
      assert "蛋白质" in zhtok.trainer.lexicon
      # egg-white
      assert "蛋白" in zhtok.trainer.dictionary["prefixes"]
      # egg
      assert "蛋" in zhtok.trainer.dictionary["prefixes"]
      # white-stuff
      assert "白质" in zhtok.trainer.dictionary["suffixes"]
      # stuff
      assert "质" in zhtok.trainer.dictionary["suffixes"]
  
file_path: stanza/stanza/tests/tokenization/test_tokenize_data.py
imports: import pytest
  import tempfile
  import numpy
  import stanza
  from stanza import Pipeline
  from stanza.tests import *
  from stanza.models.tokenization.data import DataLoader, NUMERIC_RE
label_desc: Use image node_id 8 for calling a global function with example usage: test_dictionary(zhtok) without return types