code: def test_contrast(modality, dev):
      def contrast_ref(img, magnitude):
          return ImageEnhance.Contrast(img).enhance(magnitude)
  
      data_source = get_images if modality == "image" else get_videos()
      contrast = a.contrast.augmentation(
          mag_range=(0.1, 1.9), randomly_negate=False, mag_to_param=None
      )
      magnitudes = contrast._get_magnitudes(default_batch_size)
      compare_against_baseline(
          contrast,
          pil_baseline(contrast_ref),
          data_source,
          max_allowed_error=1,
          dev=dev,
          params=magnitudes,
          modality=modality,
      )
  
imports: import itertools
  import os
  import numpy
  from PIL import Image, ImageEnhance, ImageOps
  from nose2.tools import params, cartesian_params
  import nvidia.dali.tensors
  from nvidia.dali import fn, pipeline_def
  from nvidia.dali.auto_aug import augmentations
  from nvidia.dali.auto_aug.core._utils import get_translations
  from test_utils import get_dali_extra_path, check_batch
label_desc: Use image node_id 15 for calling a global function with example usage: test_contrast(modality, dev) and returns: ImageEnhance