code: def test_median_blur_vs_ocv(bs, layout, dtype, channels, max_ksize):
      cdim = layout.find("C")
      min_shape = [64 for c in layout]
      min_shape[cdim] = channels
      max_shape = [256 for c in layout]
      max_shape[cdim] = channels
      if layout[0] == "F":
          min_shape[0] = 8
          max_shape[0] = 32
  
      data1 = test_utils.RandomlyShapedDataIterator(
          batch_size=bs,
          min_shape=min_shape,
          max_shape=max_shape,
          dtype=dtype,
          seed=SEED,
      )
      data2 = test_utils.RandomlyShapedDataIterator(
          batch_size=bs,
          min_shape=min_shape,
          max_shape=max_shape,
          dtype=dtype,
          seed=SEED,
      )
      ksize1 = ksize_src(bs, 3, max_ksize, SEED)
      ksize2 = ksize_src(bs, 3, max_ksize, SEED)
      pipe1 = median_blur_pipe(
          data_src=data1,
          layout=layout,
          ksize_src=ksize1,
          batch_size=bs,
          prefetch_queue_depth=1,
      )
      pipe2 = reference_pipe(
          data_src=data2, layout=layout, ksize_src=ksize2, batch_size=bs
      )
      test_utils.compare_pipelines(
          pipe1, pipe2, batch_size=bs, N_iterations=10
      )
  
file_path: DALI/dali/test/python/operator_1/test_median_blur.py
imports: import nvidia.dali
  import nvidia.dali.fn
  import cv2
  import numpy
  import multiprocessing
  import test_utils
  from nose2.tools import params
label_desc: Use image node_id 7 for calling a global function with example usage: test_median_blur_vs_ocv(bs, layout, dtype, channels, max_ksize) without return types