code: def __init__(
      self,
      function,
      batch_size,
      layout,
      iterator,
      num_threads=1,
      device_id=0,
  ):
      super(PythonOpPipeline, self).__init__(
          batch_size,
          num_threads,
          device_id,
          exec_async=False,
          exec_pipelined=False,
      )
      self.layout = layout
      self.iterator = iterator
      self.inputs = ops.ExternalSource()
      self.oper = ops.PythonFunction(function=function)
  
imports: from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  from nvidia.dali import fn, pipeline_def
  import math
  from test_utils import compare_pipelines, as_array, RandomDataIterator, RandomlyShapedDataIterator
  import itertools
  from nose2.tools import params
  import numpy
label_desc: Use image node_id 1 to create a new PythonOpPipeline object from inherited base classes: Pipeline with example: obj = PythonOpPipeline(function, batch_size, layout, iterator, num_threads, device_id)