code: def main(_):
      # Define schema.
      raw_metadata = dataset_metadata.DatasetMetadata(
          schema_utils.schema_from_feature_spec(
              {
                  "text": tf.FixedLenFeature([], tf.string),
                  "language_code": tf.FixedLenFeature([], tf.string),
              }
          )
      )
  
      # Add in padding tokens.
      reserved_tokens = FLAGS.reserved_tokens
      if FLAGS.num_pad_tokens:
          padded_tokens = ["<pad>"]
          padded_tokens += [
              "<pad%d>" % i for i in range(1, FLAGS.num_pad_tokens)
          ]
          reserved_tokens = padded_tokens + reserved_tokens
  
      params = learner.Params(
          FLAGS.upper_thresh,
          FLAGS.lower_thresh,
          FLAGS.num_iterations,
          FLAGS.max_input_tokens,
          FLAGS.max_token_length,
          FLAGS.max_unique_chars,
          FLAGS.vocab_size,
          FLAGS.slack_ratio,
          FLAGS.include_joiner_token,
          FLAGS.joiner,
          reserved_tokens,
      )
  
      generate_vocab(
          FLAGS.data_file,
          FLAGS.vocab_file,
          FLAGS.metrics_file,
          raw_metadata,
          params,
      )
  
file_path: text/tensorflow_text/tools/wordpiece_vocab/generate_vocab.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tempfile
  from absl import app
  from absl import flags
  import apache_beam
  import tensorflow.compat.v1
  import tensorflow_transform
  import tensorflow_transform.beam
  from tensorflow_transform.tf_metadata import dataset_metadata
  from tensorflow_transform.tf_metadata import schema_utils
  from tensorflow_text.tools.wordpiece_vocab import utils
  from tensorflow_text.tools.wordpiece_vocab import wordpiece_tokenizer_learner_lib
label_desc: Use image node_id 2 for calling a global function with example usage: main(_) without return types