code: def test_range(self):
      # all words map to the same id
      d = HashDictionary(self.texts, id_range=1, debug=True)
      dfs = {0: 9}
      id2token = {
          0: {
              "minors",
              "graph",
              "system",
              "trees",
              "eps",
              "computer",
              "survey",
              "user",
              "human",
              "time",
              "interface",
              "response",
          }
      }
      token2id = {
          "minors": 0,
          "graph": 0,
          "system": 0,
          "trees": 0,
          "eps": 0,
          "computer": 0,
          "survey": 0,
          "user": 0,
          "human": 0,
          "time": 0,
          "interface": 0,
          "response": 0,
      }
      self.assertEqual(d.dfs, dfs)
      self.assertEqual(d.id2token, id2token)
      self.assertEqual(d.token2id, token2id)
  
      # 2 ids: 0/1 for even/odd number of bytes in the word
      d = HashDictionary(
          self.texts, id_range=2, myhash=lambda key: len(key)
      )
      dfs = {0: 7, 1: 7}
      id2token = {
          0: {
              "minors",
              "system",
              "computer",
              "survey",
              "user",
              "time",
              "response",
          },
          1: {"interface", "graph", "trees", "eps", "human"},
      }
      token2id = {
          "minors": 0,
          "graph": 1,
          "system": 0,
          "trees": 1,
          "eps": 1,
          "computer": 0,
          "survey": 0,
          "user": 0,
          "human": 1,
          "time": 0,
          "interface": 1,
          "response": 0,
      }
      self.assertEqual(d.dfs, dfs)
      self.assertEqual(d.id2token, id2token)
      self.assertEqual(d.token2id, token2id)
  
file_path: gensim/gensim/test/test_corpora_hashdictionary.py
imports: import logging
  import unittest
  import os
  import zlib
  from gensim.corpora.hashdictionary import HashDictionary
  from gensim.test.utils import get_tmpfile, common_texts
label_desc: Use image node_id 6 for calling the TestHashDictionary obj's underlying member method code with example usage: obj.test_range() without return types