code: def main(unused_argv):
      if FLAGS.corpus_filepattern and FLAGS.vocab_filepattern:
          raise ValueError(
              "Must only provide one of --corpus_filepattern or --vocab_filepattern"
          )
  
      elif FLAGS.corpus_filepattern:
          token_counts = tokenizer.corpus_token_counts(
              FLAGS.corpus_filepattern,
              FLAGS.corpus_max_lines,
              split_on_newlines=FLAGS.split_on_newlines,
          )
  
      elif FLAGS.vocab_filepattern:
          token_counts = tokenizer.vocab_token_counts(
              FLAGS.vocab_filepattern, FLAGS.corpus_max_lines
          )
  
      else:
          raise ValueError(
              "Must provide one of --corpus_filepattern or --vocab_filepattern"
          )
  
      encoder = text_encoder.SubwordTextEncoder()
      encoder.build_from_token_counts(
          token_counts, FLAGS.min_count, FLAGS.num_iterations
      )
      encoder.store_to_file(FLAGS.output_filename)
  
imports: from absl import app
  from absl import flags
  from trax.data import text_encoder
  from trax.data import tokenizer
label_desc: Use image node_id 1 for calling a global function with example usage: main(unused_argv) without return types