code: def check_cmn_random_data_vs_numpy(
      cmn_op,
      device,
      batch_size,
      dtype,
      input_layout,
      input_shape,
      output_layout,
      mirror_probability,
      mean,
      std,
      scale,
      shift,
      should_pad,
  ):
      crop_z, crop_y, crop_x = (0.1, 0.2, 0.3)
      crop_d, crop_h, crop_w = (8, 16, 32)
      eii1 = RandomDataIterator(batch_size, shape=input_shape)
      eii2 = RandomDataIterator(batch_size, shape=input_shape)
  
      function = partial(
          crop_mirror_normalize_func,
          crop_z,
          crop_y,
          crop_x,
          crop_d,
          crop_h,
          crop_w,
          should_pad,
          mean,
          std,
          scale,
          shift,
          input_layout,
          output_layout,
          dali_type_to_np(dtype),
      )
  
      cmn_pipe = CMNRandomDataPipeline(
          cmn_op,
          device,
          batch_size,
          input_layout,
          iter(eii1),
          dtype=dtype,
          output_layout=output_layout,
          mirror_probability=mirror_probability,
          mean=mean,
          std=std,
          scale=scale,
          shift=shift,
          pad_output=should_pad,
      )
  
      ref_pipe = CMNRandomDataPythonOpPipeline(
          function,
          batch_size,
          input_layout,
          output_layout,
          mirror_probability,
          iter(eii2),
      )
  
      eps, max_err = (
          (1e-5, 1e-5) if dtype == types.FLOAT else (0.3, 0.6)
      )
      compare_pipelines(
          cmn_pipe,
          ref_pipe,
          batch_size,
          2,
          eps=eps,
          max_allowed_error=max_err,
      )
  
imports: import numpy
  import nvidia.dali
  import nvidia.dali.fn
  import nvidia.dali.ops
  import nvidia.dali.types
  import os
  from functools import partial
  from nvidia.dali import pipeline_def
  from nvidia.dali.pipeline import Pipeline
  from nose2.tools import params
  from nose_utils import assert_raises
  from nose_utils import raises
  from test_slice import check_slice_output, abs_slice_start_and_end
  from test_utils import RandomDataIterator
  from test_utils import as_array
  from test_utils import compare_pipelines, dali_type_to_np
  from test_utils import get_dali_extra_path
  import itertools
label_desc: Use image node_id 7 for calling a global function with example usage: check_cmn_random_data_vs_numpy(cmn_op, device, batch_size, dtype, input_layout, input_shape, output_layout, mirror_probability, mean, std, scale, shift, should_pad) without return types