code: def setUp(self):
      self.tokens = ["a", "b", "c", "d", "e", "f"]
      corpus = ["a b c", "b c d d", "c b e c f"]
      ids = ["u1", "u2", "u3"]
      # frequency ranking: c > b > d > a > e > f
      self.modality = TextModality(corpus=corpus, ids=ids, max_vocab=6)
      self.modality.build({"u1": 0, "u2": 1, "u3": 2})
      self.token_ids = (
          self.modality.vocab.tok2idx[tok] for tok in self.tokens
      )
  
imports: import unittest
  from collections import defaultdict
  import numpy
  import numpy.testing
  from cornac.data import TextModality, ReviewModality
  from cornac.data.text import SPECIAL_TOKENS, DEFAULT_PRE_RULES, BaseTokenizer, Vocabulary, CountVectorizer, TfidfVectorizer
label_desc: Use image node_id 1 for calling the TestTextModality obj's underlying member method code with example usage: obj.setUp() without return types