code: def _arg_parser():
      parser = argparse.ArgumentParser(
          description=__doc__,
          add_help=False,
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
  
      parser.add_argument(
          "-i",
          "--input-path",
          type=str,
          required=True,
          help="Path to the imagenet directory. If you are running this script on a Spark cluster, "
          "you should have this file be mounted and accessible to executors.",
      )
      parser.add_argument(
          "-o",
          "--output-url",
          type=str,
          required=True,
          help="hdfs://... or file:/// url where the parquet dataset will be written to.",
      )
      parser.add_argument(
          "-m",
          "--master",
          type=str,
          required=False,
          default=None,
          help="Spark master. Use --master=local[*] to run locally.",
      )
  
      return parser
  
file_path: petastorm/examples/imagenet/generate_petastorm_imagenet.py
imports: from __future__ import division
  import argparse
  import glob
  import json
  import os
  import cv2
  from pyspark.sql import SparkSession
  from six.moves.urllib.request import urlopen
  from examples.imagenet.schema import ImagenetSchema
  from petastorm.etl.dataset_metadata import materialize_dataset
  from petastorm.unischema import dict_to_spark_row
label_desc: Use image node_id 1 for calling a global function with example usage: _arg_parser() and returns: parser