code: def get_reduced_cifar10_policy(
      use_shape: bool = False,
      max_translate_abs: Optional[int] = None,
      max_translate_rel: Optional[float] = None,
  ) -> Policy:
      """
      Creates augmentation policy tuned with the reduced CIFAR-10 as described
      in AutoAugment paper (https://arxiv.org/abs/1805.09501).
      The returned policy can be run with
      :meth:`~nvidia.dali.auto_aug.auto_augment.apply_auto_augment`.
  
      Args
      ----
      use_shape : bool
          If true, the translation offset is computed as a percentage of the image/frame shape.
          Useful if the samples processed with the auto augment have different shapes.
          If false, the offsets range is bounded by a constant (`max_translate_abs`).
      max_translate_abs: int or (int, int), optional
          Only valid with use_shape=False, specifies the maximal shift (in pixels) in the translation
          augmentations. If a tuple is specified, the first component limits height, the second the
          width. Defaults to 250.
      max_translate_rel: float or (float, float), optional
          Only valid with use_shape=True, specifies the maximal shift as a fraction of image/frame
          shape in the translation augmentations. If a tuple is specified, the first component limits
          height, the second the width. Defaults to 1.
      """
      default_translate_abs, default_translate_rel = 250, 1.0
      translate_x, translate_y = _get_translations(
          use_shape,
          default_translate_abs,
          default_translate_rel,
          max_translate_abs,
          max_translate_rel,
      )
      shear_y = a.shear_y.augmentation((0, 0.3), True)
      rotate = a.rotate.augmentation((0, 30), True)
      brightness = a.brightness.augmentation((0.1, 1.9), False, None)
      color = a.color.augmentation((0.1, 1.9), False, None)
      contrast = a.contrast.augmentation((0.1, 1.9), False, None)
      sharpness = a.sharpness.augmentation(
          (0.1, 1.9), False, a.sharpness_kernel_shifted
      )
      posterize = a.posterize.augmentation(
          (0, 4), False, a.poster_mask_uint8
      )
      solarize = a.solarize.augmentation((0, 256), False)
      invert = a.invert
      equalize = a.equalize
      auto_contrast = a.auto_contrast
      return Policy(
          name="ReducedCifar10Policy",
          num_magnitude_bins=11,
          sub_policies=[
              [(invert, 0.1, None), (contrast, 0.2, 6)],
              [(rotate, 0.7, 2), (translate_x, 0.3, 9)],
              [(sharpness, 0.8, 1), (sharpness, 0.9, 3)],
              [(shear_y, 0.5, 8), (translate_y, 0.7, 9)],
              [(auto_contrast, 0.5, None), (equalize, 0.9, None)],
              [(shear_y, 0.2, 7), (posterize, 0.3, 7)],
              [(color, 0.4, 3), (brightness, 0.6, 7)],
              [(sharpness, 0.3, 9), (brightness, 0.7, 9)],
              [(equalize, 0.6, None), (equalize, 0.5, None)],
              [(contrast, 0.6, 7), (sharpness, 0.6, 5)],
              [(color, 0.7, 7), (translate_x, 0.5, 8)],
              [(equalize, 0.3, None), (auto_contrast, 0.4, None)],
              [(translate_y, 0.4, 3), (sharpness, 0.2, 6)],
              [(brightness, 0.9, 6), (color, 0.2, 8)],
              [(solarize, 0.5, 2)],
              [(equalize, 0.2, None), (auto_contrast, 0.6, None)],
              [(equalize, 0.2, None), (equalize, 0.6, None)],
              [(color, 0.9, 9), (equalize, 0.6, None)],
              [(auto_contrast, 0.8, None), (solarize, 0.2, 8)],
              [(brightness, 0.1, 3), (color, 0.7, 0)],
              [(solarize, 0.4, 5), (auto_contrast, 0.9, None)],
              [(translate_y, 0.9, 9), (translate_y, 0.7, 9)],
              [(auto_contrast, 0.9, None), (solarize, 0.8, 3)],
              [(equalize, 0.8, None), (invert, 0.1, None)],
              [(translate_y, 0.7, 9), (auto_contrast, 0.9, None)],
          ],
      )
  
file_path: DALI/dali/python/nvidia/dali/auto_aug/auto_augment.py
imports: from typing import List, Optional, Tuple, Union
  from nvidia.dali import fn
  from nvidia.dali import types
  from nvidia.dali.auto_aug import augmentations
  from nvidia.dali.auto_aug.core import _Augmentation, Policy, signed_bin
  from nvidia.dali.auto_aug.core._args import forbid_unused_kwargs
  from nvidia.dali.auto_aug.core._utils import get_translations, pretty_select
  from nvidia.dali.data_node import DataNode
label_desc: Use image node_id 5 for calling a global function with example usage: get_reduced_cifar10_policy(use_shape, max_translate_abs, max_translate_rel) and returns: Policy