code: def test_vocab_size(self):
      # Character-level.
      char_size = tf_inputs.vocab_size(
          vocab_type="char", n_reserved_ids=11
      )
      self.assertEqual(char_size, 256 + 11)
      # Sentencepiece.
      spc_size = tf_inputs.vocab_size(
          vocab_type="sentencepiece",
          vocab_dir=_TESTDATA,
          vocab_file="sentencepiece.model",
      )
      self.assertEqual(spc_size, 32000)
      # Subword.
      sbw_size = tf_inputs.vocab_size(
          vocab_type="subword",
          vocab_dir=_TESTDATA,
          vocab_file="en_8k.subword",
      )
      self.assertEqual(sbw_size, 8183)
      # Bert_uncased.
      sbw_size = tf_inputs.vocab_size(
          vocab_type="bert-lowercase",
          vocab_dir=_TESTDATA,
          vocab_file="bert_uncased_vocab.txt",
      )
      self.assertEqual(sbw_size, 30522)
  
imports: import collections
  import os
  from unittest import mock
  import gin
  import numpy
  from t5.data import assert_dataset
  from t5.data import preprocessors
  import tensorflow
  import tensorflow_datasets
  from trax.data import inputs
  from trax.data import tf_inputs
label_desc: Use image node_id 10 for calling the TFInputsTest obj's underlying member method code with example usage: obj.test_vocab_size() without return types