code: def test_equalize(modality, dev):
      # pil's equalization uses slightly different formula when
      # transforming cumulative-sum of histogram into lookup table than open-cv
      # so the point-wise diffs can be significant, but the average is not
      data_source = get_images if modality == "image" else get_videos()
      compare_against_baseline(
          a.equalize,
          pil_baseline(ImageOps.equalize),
          data_source,
          max_allowed_error=None,
          dev=dev,
          eps=7,
          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 22 for calling a global function with example usage: test_equalize(modality, dev) without return types