code: def test_tfidf_params(self):
      corpus = ["a b c", "b c d d", "c b e c f"]
      ids = ["u1", "u2", "u3"]
  
      modality = TextModality(
          corpus=corpus,
          ids=ids,
          max_vocab=6,
          tfidf_params={
              "binary": False,
              "norm": "l2",
              "use_idf": True,
              "smooth_idf": True,
              "sublinear_tf": False,
          },
      ).build({"u1": 0, "u2": 1, "u3": 2})
      npt.assert_array_equal(
          modality.batch_tfidf([1]), self.modality.batch_tfidf([1])
      )
  
      for k, v in {
          "binary": True,
          "norm": "l1",
          "use_idf": False,
          "smooth_idf": False,
          "sublinear_tf": True,
      }.items():
          modality = TextModality(
              corpus=corpus, ids=ids, max_vocab=6, tfidf_params={k: v}
          )
          modality.build({"u1": 0, "u2": 1, "u3": 2})
          self.assertFalse(
              np.array_equal(
                  modality.batch_tfidf([1]),
                  self.modality.batch_tfidf([1]),
              )
          )
  
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 10 for calling the TestTextModality obj's underlying member method code with example usage: obj.test_tfidf_params() without return types