code: def test_dictionary_feats(zhtok):
      """
      Test the results of running a sentence into the dictionary featurizer
      """
      raw_text = "我想吃蛋白质"
      batches = DataLoader(
          zhtok.config,
          input_text=raw_text,
          vocab=zhtok.vocab,
          evaluation=True,
          dictionary=zhtok.trainer.dictionary,
      )
      data = batches.data
      assert len(data) == 1
      assert len(data[0]) == 6
  
      expected_features = [
          # in our example, the 2-grams made by the one character words at the start
          # don't form any prefixes or suffixes
          [0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0, 0, 0, 0],
          [1, 1, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 1, 0, 0, 0],
          [0, 0, 0, 0, 0, 1, 0, 0],
      ]
  
      for i, expected in enumerate(expected_features):
          dict_features = batches.extract_dict_feat(data[0], i)
          assert dict_features == expected
  
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 9 for calling a global function with example usage: test_dictionary_feats(zhtok) without return types