code: def test_vs_cv():
      def impl(device, batch_size, use_input, otype, itype, inv_map):
          cv_pipeline = CVPipeline(
              batch_size, otype, itype, use_input, inv_map=inv_map
          )
          cv_pipeline.build()
          cpu_pipeline = WarpPipeline(
              device,
              batch_size,
              otype,
              itype,
              use_input,
              inv_map=inv_map,
          )
          cpu_pipeline.build()
          compare(cv_pipeline, cpu_pipeline, 8)
  
      random.seed(1009)
      for device in ["cpu", "gpu"]:
          for use_input in [False, True]:
              for itype, otype in io_types:
                  inv_map = random.choice([False, True])
                  batch_size = random.choice([1, 4, 19])
                  yield impl, device, batch_size, use_input, otype, itype, inv_map
  
imports: import nose_utils
  from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.fn
  import nvidia.dali.types
  import numpy
  import math
  import os
  import cv2
  from sequences_test_utils import video_suite_helper, SampleDesc, ArgCb
  from test_utils import compare_pipelines
  import random
label_desc: Use image node_id 6 for calling a global function with example usage: test_vs_cv() without return types