code: def main():
      # Training settings
      parser = argparse.ArgumentParser(
          description="Petastorm Tensorflow MNIST Example"
      )
      default_dataset_url = "file://{}".format(DEFAULT_MNIST_DATA_PATH)
      parser.add_argument(
          "--dataset-url",
          type=str,
          default=default_dataset_url,
          metavar="S",
          help="hdfs:// or file:/// URL to the MNIST petastorm dataset"
          "(default: %s)" % default_dataset_url,
      )
      parser.add_argument(
          "--training-iterations",
          type=int,
          default=100,
          metavar="N",
          help="number of training iterations to train (default: 100)",
      )
      parser.add_argument(
          "--batch-size",
          type=int,
          default=100,
          metavar="N",
          help="input batch size for training (default: 100)",
      )
      parser.add_argument(
          "--evaluation-interval",
          type=int,
          default=10,
          metavar="N",
          help="how many batches to wait before evaluating the model accuracy (default: 10)",
      )
      args = parser.parse_args()
  
      train_and_test(
          dataset_url=args.dataset_url,
          training_iterations=args.training_iterations,
          batch_size=args.batch_size,
          evaluation_interval=args.evaluation_interval,
      )
  
file_path: petastorm/examples/mnist/tf_example.py
imports: from __future__ import division, print_function
  import argparse
  import os
  import tensorflow.compat.v1
  from examples.mnist import DEFAULT_MNIST_DATA_PATH
  from petastorm import make_reader
  from petastorm.tf_utils import tf_tensors
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types