code: def images_pipeline(layout, dev):
      images, _ = fn.readers.file(
          name="Reader",
          file_root=images_dir,
          prefetch_queue_depth=2,
          random_shuffle=True,
          seed=42,
      )
      decoder = "mixed" if dev == "gpu" else "cpu"
      if layout == "HW":
          images = fn.decoders.image(
              images, device=decoder, output_type=types.GRAY
          )
          images = fn.squeeze(images, axes=2)
      else:
          assert layout in ["HWC", "CHW"], f"{layout}"
          images = fn.decoders.image(
              images, device=decoder, output_type=types.RGB
          )
          if layout == "CHW":
              images = fn.transpose(images, perm=[2, 0, 1])
      equalized = fn.experimental.equalize(images)
      return equalized, images
  
file_path: DALI/dali/test/python/operator_2/test_equalize.py
imports: import os
  import math
  import itertools
  import cv2
  import numpy
  from nvidia.dali import pipeline_def, fn, types
  from test_utils import get_dali_extra_path, check_batch
  from nose2.tools import params
label_desc: Use image node_id 2 for calling a global function with example usage: images_pipeline(layout, dev) and returns: equalized,  images