code: def check_water_vs_cv(device, batch_size, niter, dtype, prime_size):
      phase_y = 0.5
      phase_x = 0.2
      freq_x = 0.06
      freq_y = 0.08
      ampl_x = 2.0
      ampl_y = 3.0
  
      def python_func(img):
          return python_water(
              img, phase_y, phase_x, freq_x, freq_y, ampl_x, ampl_y
          )
  
      compare_pipelines(
          WaterPipeline(
              device,
              batch_size,
              ampl_x=ampl_x,
              ampl_y=ampl_y,
              phase_x=phase_x,
              phase_y=phase_y,
              freq_x=freq_x,
              freq_y=freq_y,
              dtype=dtype,
              prime_size=prime_size,
          ),
          WaterPythonPipeline(
              batch_size,
              python_func,
              dtype=dtype,
              prime_size=prime_size,
          ),
          batch_size=batch_size,
          N_iterations=niter,
          eps=8,
      )
  
imports: import nose_utils
  from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.fn
  import nvidia.dali.types
  import nvidia.dali
  import numpy
  import os
  import cv2
  from test_utils import compare_pipelines
  from test_utils import get_dali_extra_path
label_desc: Use image node_id 4 for calling a global function with example usage: check_water_vs_cv(device, batch_size, niter, dtype, prime_size) and returns: python_water