code: def test_with_tokenizer(self):
      class DummyTokenizer(object):
          def tokenize(self, s):
              del s
              return ["hi", "bye"]
  
      tokenizer = DummyTokenizer()
      vocab_list = ["hi", "bye", ZH_HELLO]
      encoder = text_encoder.TokenTextEncoder(
          vocab_list=vocab_list, tokenizer=tokenizer
      )
      # Ensure it uses the passed tokenizer and not the default
      self.assertEqual([1, 2], encoder.encode("zoo foo"))
  
imports: from __future__ import unicode_literals
  import os
  from absl.testing import parameterized
  import numpy
  from tensorflow_datasets import testing
  from tensorflow_datasets.core.deprecated.text import text_encoder
label_desc: Use image node_id 9 for calling the TokenTextEncoderTest obj's underlying member method code with example usage: obj.test_with_tokenizer() and returns: list