code: def test_build(self):
      d = Dictionary(self.texts)
  
      # Since we don't specify the order in which dictionaries are built,
      # we cannot reliably test for the mapping; only the keys and values.
      expected_keys = list(range(12))
      expected_values = [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3]
      self.assertEqual(sorted(d.dfs.keys()), expected_keys)
      self.assertEqual(sorted(d.dfs.values()), expected_values)
  
      expected_keys = sorted(
          [
              "computer",
              "eps",
              "graph",
              "human",
              "interface",
              "minors",
              "response",
              "survey",
              "system",
              "time",
              "trees",
              "user",
          ]
      )
      expected_values = list(range(12))
      self.assertEqual(sorted(d.token2id.keys()), expected_keys)
      self.assertEqual(sorted(d.token2id.values()), expected_values)
  
imports: from collections.abc import Mapping
  from itertools import chain
  import logging
  import unittest
  import codecs
  import os
  import os.path
  import scipy
  import gensim
  from gensim.corpora import Dictionary
  from gensim.utils import to_utf8
  from gensim.test.utils import get_tmpfile, common_texts
label_desc: Use image node_id 6 for calling the TestDictionary obj's underlying member method code with example usage: obj.test_build() without return types