class_docstr: Standard Batch Sampler for data parallel. This sampler yields batches of fixed batch size
  and spatial resolutions.
  
  Args:
      opts: command line argument
      n_data_samples: Number of samples in the dataset
      is_training: Training or validation mode. Default: False
code: def add_arguments(
      cls, parser: argparse.ArgumentParser
  ) -> argparse.ArgumentParser:
      if cls != BatchSampler:
          # Don't re-register arguments in subclasses that don't override `add_arguments()`.
          return parser
      group = parser.add_argument_group(cls.__name__)
      group.add_argument(
          "--sampler.bs.crop-size-width",
          default=DEFAULT_IMAGE_WIDTH,
          type=int,
          help="Base crop size (along width) during training",
      )
      group.add_argument(
          "--sampler.bs.crop-size-height",
          default=DEFAULT_IMAGE_HEIGHT,
          type=int,
          help="Base crop size (along height) during training",
      )
      return parser
  
file_path: ml-cvnets/data/sampler/batch_sampler.py
imports: import argparse
  from typing import Iterator, Tuple
  from common import DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH
  from data.sampler import SAMPLER_REGISTRY
  from data.sampler.base_sampler import BaseSampler, BaseSamplerDDP
label_desc: Use image node_id 4 for calling the BatchSampler obj's underlying member method code with example usage: obj.add_arguments(cls, parser) and returns: parser, parser