code: def test_wrong_params_fail():
      @pipeline_def(
          batch_size=4,
          device_id=0,
          num_threads=4,
          seed=42,
          enable_conditionals=True,
      )
      def pipeline(n, m, num_magnitude_bins):
          data = types.Constant(np.array([[[]]], dtype=np.uint8))
          return rand_augment.rand_augment(
              data, n=n, m=m, num_magnitude_bins=num_magnitude_bins
          )
  
      with assert_raises(
          Exception,
          glob="The number of operations to apply `n` must be a non-negative integer",
      ):
          pipeline(n=None, m=1, num_magnitude_bins=11)
  
      with assert_raises(
          Exception,
          glob="The `num_magnitude_bins` must be a positive integer, got",
      ):
          pipeline(n=1, m=1, num_magnitude_bins=None)
  
      with assert_raises(
          Exception,
          glob="`m` must be an integer from `[[]0, 14[]]` range. Got 15.",
      ):
          pipeline(n=1, m=15, num_magnitude_bins=15)
  
      with assert_raises(
          Exception, glob="The `augmentations` list cannot be empty"
      ):
  
          @pipeline_def(
              batch_size=4,
              device_id=0,
              num_threads=4,
              seed=42,
              enable_conditionals=True,
          )
          def no_aug_pipeline():
              data = types.Constant(np.array([[[]]], dtype=np.uint8))
              return rand_augment.apply_rand_augment([], data, 1, 20)
  
          no_aug_pipeline()
  
      with assert_raises(
          Exception,
          glob="The augmentation `translate_x` requires `shape` argument",
      ):
  
          @pipeline_def(
              batch_size=4,
              device_id=0,
              num_threads=4,
              seed=42,
              enable_conditionals=True,
          )
          def missing_shape():
              data = types.Constant(np.array([[[]]], dtype=np.uint8))
              augments = rand_augment.get_rand_augment_suite(
                  use_shape=True
              )
              return rand_augment.apply_rand_augment(
                  augments, data, 1, 20
              )
  
          missing_shape()
  
      with assert_raises(
          Exception, glob="The kwarg `shhape` is not used by any of the"
      ):
  
          @pipeline_def(
              batch_size=4,
              device_id=0,
              num_threads=4,
              seed=42,
              enable_conditionals=True,
          )
          def unused_kwarg():
              data = types.Constant(np.array([[[]]], dtype=np.uint8))
              augments = rand_augment.get_rand_augment_suite(
                  use_shape=True
              )
              return rand_augment.apply_rand_augment(
                  augments, data, 1, 20, shhape=42
              )
  
          unused_kwarg()
  
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 4 for calling a global function with example usage: test_wrong_params_fail() and returns: rand_augment, rand_augment, rand_augment, rand_augment