code: def __init__(
      self,
      function,
      batch_size,
      layout,
      output_layout,
      mirror_probability,
      iterator,
      num_threads=1,
      device_id=0,
  ):
      super().__init__(
          batch_size,
          num_threads,
          device_id,
          exec_async=False,
          exec_pipelined=False,
      )
      self.layout = layout
      self.iterator = iterator
      self.inputs = ops.ExternalSource()
      self.cmn = ops.PythonFunction(
          function=function, output_layouts=output_layout
      )
      self.coin = ops.random.CoinFlip(
          probability=mirror_probability, seed=7865
      )
  
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 1 to create a new CMNRandomDataPythonOpPipeline object from inherited base classes: Pipeline with example: obj = CMNRandomDataPythonOpPipeline(function, batch_size, layout, output_layout, mirror_probability, iterator, num_threads, device_id)