code: def test_lo_hi_mag_range():
      mag_range = (100, 110)
      batch_size = 11
      const_bin = 2
  
      @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,
              num_magnitude_bins=5,
          )
          dyn_mag = pass_through_mag(
              types.Constant(42),
              magnitude_bin=idx_in_batch,
              num_magnitude_bins=11,
          )
          return const_mag, dyn_mag
  
      p = pipeline()
      p.build()
      const_mag, dyn_mag = p.run()
      const_mag_ref = ref_param(mag_range, 5, [const_bin] * batch_size)
      dyn_mag_ref = ref_param(mag_range, 11, 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 4 for calling a global function with example usage: test_lo_hi_mag_range() and returns: param, const_mag,  dyn_mag