code: def test_explicit_mag_range():
      mag_range = np.array([1, 1, 2, 3, 5, 8, 13, 21])
      batch_size = 8
      const_bin = 7
  
      @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():
          idx_in_batch = sample_info(lambda info: info.idx_in_batch)
          const_mag = pass_through_mag(
              types.Constant(42), magnitude_bin=const_bin
          )
          dyn_mag = pass_through_mag(
              types.Constant(42), magnitude_bin=idx_in_batch
          )
          return const_mag, dyn_mag
  
      p = pipeline()
      p.build()
      const_mag, dyn_mag = p.run()
      const_mag_ref = ref_param(
          mag_range, None, [const_bin] * batch_size
      )
      dyn_mag_ref = ref_param(mag_range, None, list(range(batch_size)))
      check_batch(const_mag, const_mag_ref, max_allowed_error=0)
      check_batch(dyn_mag, dyn_mag_ref, 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 5 for calling a global function with example usage: test_explicit_mag_range() and returns: param, const_mag,  dyn_mag