code: def test_no_randomly_negate(const_mag):
      mag_range = (0, 10)
      num_magnitude_bins = 11
      batch_size = 32
  
      @augmentation(mag_range=mag_range)
      def pass_through_mag(data, param):
          return param
  
      @pipeline_def(
          num_threads=4, device_id=0, batch_size=batch_size, seed=42
      )
      def pipeline():
          magnitude_bin = (
              const_mag
              if const_mag is not None
              else sample_info(
                  lambda info: info.idx_in_batch % num_magnitude_bins
              )
          )
  
          # make sure that the augmentation declared without `randomly_negate` ignores the signed_bin
          return pass_through_mag(
              types.Constant(42),
              magnitude_bin=signed_bin(magnitude_bin),
              num_magnitude_bins=num_magnitude_bins,
          )
  
      p = pipeline()
      p.build()
      (magnitudes,) = p.run()
      magnitude_bin = (
          [const_mag] * batch_size
          if const_mag is not None
          else [i % num_magnitude_bins for i in range(batch_size)]
      )
      ref_magnitudes = ref_param(mag_range, 11, magnitude_bin)
      check_batch(magnitudes, ref_magnitudes, max_allowed_error=0)
  
imports: import numpy
  import nvidia.dali.tensors
  from nvidia.dali import pipeline_def, fn, types
  from nvidia.dali.auto_aug.core import augmentation, signed_bin
  from nvidia.dali.auto_aug.core._args import forbid_unused_kwargs
  from nose2.tools import params
  from test_utils import check_batch
  from nose_utils import assert_warns, assert_raises
label_desc: Use image node_id 7 for calling a global function with example usage: test_no_randomly_negate(const_mag) and returns: param, pass_through_mag