code: def test_doc_freq_and_token2id_for_several_docs_with_one_word(self):
      # two docs
      texts = [["human"], ["human"]]
      d = Dictionary(texts)
      expected = {0: 2}
      self.assertEqual(d.dfs, expected)
      # only one token (human) should exist
      expected = {"human": 0}
      self.assertEqual(d.token2id, expected)
  
      # three docs
      texts = [["human"], ["human"], ["human"]]
      d = Dictionary(texts)
      expected = {0: 3}
      self.assertEqual(d.dfs, expected)
      # only one token (human) should exist
      expected = {"human": 0}
      self.assertEqual(d.token2id, expected)
  
      # four docs
      texts = [["human"], ["human"], ["human"], ["human"]]
      d = Dictionary(texts)
      expected = {0: 4}
      self.assertEqual(d.dfs, expected)
      # only one token (human) should exist
      expected = {"human": 0}
      self.assertEqual(d.token2id, expected)
  
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 3 for calling the TestDictionary obj's underlying member method code with example usage: obj.test_doc_freq_and_token2id_for_several_docs_with_one_word() without return types