code: def test_batch_tfidf(self):
      batch_tfidf = self.modality.batch_tfidf([2, 1])
      self.assertEqual((2, self.modality.max_vocab), batch_tfidf.shape)
  
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 9 for calling the TestTextModality obj's underlying member method code with example usage: obj.test_batch_tfidf() without return types