code: def test_max_chars(self):
      text_gen = lorem_ipsum_zh_generator
      build_fn = (
          subword_text_encoder.SubwordTextEncoder.build_from_corpus
      )
      encoder = build_fn(text_gen(), 300, max_corpus_chars=1)
      self.assertGreater(encoder.vocab_size, text_encoder.NUM_BYTES + 1)
      self.assertEqual(1, len(encoder.subwords))
      first_letter = next(lorem_ipsum_zh_generator())[0]
      self.assertEqual(first_letter, encoder.subwords[0])
  
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 4 for calling the SubwordTextEncoderBuildTest obj's underlying member method code with example usage: obj.test_max_chars() without return types