code: def equalize_cv_baseline(img, layout):
      if layout == "HW":
          return cv2.equalizeHist(img)
      if layout == "HWC":
          img = img.transpose(2, 0, 1)
          axis = 2
      else:
          assert layout == "CHW", f"{layout}"
          axis = 0
      return np.stack(
          [cv2.equalizeHist(channel) for channel in img], axis=axis
      )
  
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 1 for calling a global function with example usage: equalize_cv_baseline(img, layout) and returns: np, cv2