code: def test_reserved_tokens(self):
      text_gen = lorem_ipsum_generator
      build_fn = (
          subword_text_encoder.SubwordTextEncoder.build_from_corpus
      )
      encoder = build_fn(
          text_gen(), 300, reserved_tokens=["<EOS>", "<EOD>"]
      )
      self.assertEqual(2, encoder.encode("Lorem<EOD>")[-1])
      self.assertEqual(2, encoder.encode("Lorem<EOD>a")[-2])
      self.assertEqual(2, encoder.encode("Lorem<EOD>{")[-2])
      self.assertEqual(2, encoder.encode("Lorem<EOD> ")[-2])
      self.assertEqual("<EOS> <EOD>", encoder.decode([1, 78, 2]))
      self.assertEqual(["<EOS>", "<EOD>"], encoder.subwords[:2])
  
imports: from __future__ import unicode_literals
  import os
  from absl.testing import parameterized
  import tensorflow
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.deprecated.text import subword_text_encoder
  from tensorflow_datasets.core.deprecated.text import text_encoder
label_desc: Use image node_id 5 for calling the SubwordTextEncoderBuildTest obj's underlying member method code with example usage: obj.test_reserved_tokens() without return types