code: def test_to_idx(self):
      self.assertEqual(self.vocab.to_idx(self.tok_seq), self.idx_seq)
  
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 3 for calling the TestVocabulary obj's underlying member method code with example usage: obj.test_to_idx() without return types