code: def add_dataset_args(parser):
      def float_list(x):
          return list(map(float, x.split(",")))
  
      def int_list(x):
          return list(map(int, x.split(",")))
  
      dataset_group = parser.add_argument_group("Dataset")
      dataset_group.add_argument(
          "--image-root",
          type=str,
          default="/imagenet",
          help="A root folder of train/val images. It should contain train and val folders, "
          "which store corresponding images.",
      )
      dataset_group.add_argument(
          "--image-shape",
          type=int_list,
          default=[4, 224, 224],
          help="The image shape. Its shape should be [channel, height, width].",
      )
  
      # Data Loader
      dataset_group.add_argument(
          "--batch-size",
          type=int,
          default=256,
          help="The batch size for both training and evaluation.",
      )
      dataset_group.add_argument(
          "--dali-random-seed",
          type=int,
          default=42,
          help="The random seed for DALI data loader.",
      )
      dataset_group.add_argument(
          "--dali-num-threads",
          type=int,
          default=4,
          help="The number of threads applied to DALI data loader.",
      )
      dataset_group.add_argument(
          "--dali-output-fp16",
          action="store_true",
          help="Output FP16 data from DALI data loader.",
      )
  
      # Augmentation
      augmentation_group = parser.add_argument_group(
          "Data Augmentation"
      )
      augmentation_group.add_argument(
          "--crop-size",
          type=int,
          default=224,
          help="The size to crop input images.",
      )
      augmentation_group.add_argument(
          "--rand-crop-scale",
          type=float_list,
          default=[0.08, 1.0],
          help="Range from which to choose a random area fraction.",
      )
      augmentation_group.add_argument(
          "--rand-crop-ratio",
          type=float_list,
          default=[3.0 / 4, 4.0 / 3],
          help="Range from which to choose a random aspect ratio (width/height).",
      )
      augmentation_group.add_argument(
          "--normalize-scale",
          type=float,
          default=1.0 / 255.0,
          help="A scalar to normalize images.",
      )
      augmentation_group.add_argument(
          "--normalize-mean",
          type=float_list,
          default=[0.485, 0.456, 0.406],
          help="The mean values to normalize RGB images.",
      )
      augmentation_group.add_argument(
          "--normalize-std",
          type=float_list,
          default=[0.229, 0.224, 0.225],
          help="The std values to normalize RGB images.",
      )
      augmentation_group.add_argument(
          "--resize-short",
          type=int,
          default=256,
          help="The length of the shorter dimension of the resized image.",
      )
      return parser
  
file_path: DALI/docs/examples/use_cases/paddle/resnet50/utils/config.py
imports: import os
  import copy
  import argparse
  import logging
  import distutils.util
  import dllogger
  from utils.mode import RunScope
  from utils.utility import get_num_trainers
  from utils.save_load import _PDOPT_SUFFIX, _PDPARAMS_SUFFIX
label_desc: Use image node_id 7 for calling a global function with example usage: add_dataset_args(parser) and returns: parser, list, list