code: def test_invert(modality, dev):
      data_source = get_images if modality == "image" else get_videos()
      compare_against_baseline(
          a.invert,
          pil_baseline(ImageOps.invert),
          data_source,
          max_allowed_error=1,
          dev=dev,
          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 21 for calling a global function with example usage: test_invert(modality, dev) without return types