code: def _validate_build_arguments(
      max_subword_length, reserved_tokens, target_vocab_size
  ):
      """Validate arguments for SubwordTextEncoder.build_from_corpus."""
      if max_subword_length <= 0:
          raise ValueError(
              "max_subword_length must be > 0. Note that memory and compute for "
              "building the vocabulary scale quadratically in the length of the "
              "longest token."
          )
      for t in reserved_tokens:
          if t.endswith("_") or not text_encoder.is_mixed_alphanum(t):
              raise ValueError(
                  "Reserved tokens must not end with _ and they must contain a mix "
                  "of alphanumeric and non-alphanumeric characters. For example, "
                  "'<EOS>'."
              )
      # Minimum vocab size = bytes + pad + 1
      minimum_vocab_size = text_encoder.NUM_BYTES + 1 + 1
      if target_vocab_size < minimum_vocab_size:
          raise ValueError(
              "target_vocab_size must be >= %d. Got %d"
              % (minimum_vocab_size, target_vocab_size)
          )
  
imports: from __future__ import unicode_literals
  import collections
  from absl import logging
  from tensorflow_datasets.core.deprecated.text import text_encoder
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: _validate_build_arguments(max_subword_length, reserved_tokens, target_vocab_size) without return types