code: def main(_):
      if FLAGS.for_commoncrawl:
          problem = wikisum.WikisumCommoncrawl()
      else:
          problem = wikisum.WikisumWeb()
  
      out_filepaths = problem.out_filepaths(FLAGS.out_dir)
      out_filepaths = utils.shard(out_filepaths, FLAGS.num_tasks)[
          FLAGS.task_id
      ]
  
      if not FLAGS.vocab_dir:
          FLAGS.vocab_dir = FLAGS.out_dir
  
      shard_ids = utils.shard(
          list(range(utils.NUM_SHARDS)), FLAGS.num_tasks
      )[FLAGS.task_id]
  
      with utils.timing("produce_examples"):
          wikisum.produce_examples(
              shard_ids=shard_ids,
              wikis_dir=FLAGS.wikis_dir,
              refs_dir=FLAGS.refs_dir,
              urls_dir=FLAGS.urls_dir,
              vocab_path=os.path.join(
                  FLAGS.vocab_dir, problem.vocab_filename
              ),
              out_filepaths=out_filepaths,
          )
  
file_path: tensor2tensor/tensor2tensor/data_generators/wikisum/produce_examples.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from six.moves import range
  from tensor2tensor.data_generators.wikisum import utils
  from tensor2tensor.data_generators.wikisum import wikisum
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling a global function with example usage: main(_) without return types