code: def test_run_rand_aug(i, args):
      (
          dev,
          uniformly_resized,
          use_shape,
          fill_value,
          specify_translation_bounds,
      ) = args
      # Keep batch_sizes ns and ms length co-prime
      batch_sizes = [1, 8, 7, 13, 31, 64, 47]
      ns = [1, 2, 3]
      ms = [0, 12, 15, 30]
      batch_size = batch_sizes[i % len(batch_sizes)]
      n = ns[i % len(ns)]
      m = ms[i % len(ms)]
  
      @pipeline_def(
          enable_conditionals=True,
          batch_size=batch_size,
          num_threads=4,
          device_id=0,
          seed=43,
      )
      def pipeline():
          encoded_image, _ = fn.readers.file(
              name="Reader", file_root=images_dir
          )
          decoded_image = fn.decoders.image(
              encoded_image, device="cpu" if dev == "cpu" else "mixed"
          )
          resized_image = (
              decoded_image
              if not uniformly_resized
              else fn.resize(decoded_image, size=(244, 244))
          )
          extra = (
              {}
              if not use_shape
              else {"shape": fn.peek_image_shape(encoded_image)}
          )
          if fill_value is not None:
              extra["fill_value"] = fill_value
          if specify_translation_bounds:
              if use_shape:
                  extra["max_translate_rel"] = 0.9
              else:
                  extra["max_translate_abs"] = 400
          raugmented_image = rand_augment.rand_augment(
              resized_image, n=n, m=m, **extra
          )
          return (
              encoded_image,
              decoded_image,
              resized_image,
              raugmented_image,
          )
  
      # run the pipeline twice to make sure instantiation preserves determinism
      p1 = pipeline()
      p1.build()
      p2 = pipeline()
      p2.build()
      for iteration_idx in range(3):
          encoded1, decoded1, resized1, out1 = p1.run()
          encoded2, decoded2, resized2, out2 = p2.run()
          try:
              check_batch(out1, out2)
          except AssertionError as e:
              diffs = debug_discrepancy_helper(
                  (encoded1, encoded2, "encoded"),
                  (decoded1, decoded2, "decoded"),
                  (resized1, resized2, "resized"),
                  (out1, out2, "out"),
              )
              iter_diff = {
                  "iteration_idx": iteration_idx,
                  "diffs": diffs,
              }
              raise AssertionError(
                  f"The outputs do not match, the differences between encoded, decoded, "
                  f"resized and augmented batches are respectively: {repr(iter_diff)}"
              ) from e
  
imports: import itertools
  import os
  import random
  import unittest
  import numpy
  from scipy.stats import chisquare
  from nose2.tools import params
  from nvidia.dali import fn, tensors, types
  from nvidia.dali import pipeline_def
  from nvidia.dali.auto_aug import rand_augment
  from nvidia.dali.auto_aug.core import augmentation
  from test_utils import get_dali_extra_path, check_batch
  from nose_utils import assert_raises
label_desc: Use image node_id 2 for calling a global function with example usage: test_run_rand_aug(i, args) and returns: encoded_image,  decoded_image,  resized_image,  raugmented_image