code: def __init__(
      self,
      function,
      batch_size,
      data_layout,
      iterator,
      anchor,
      shape,
      axis_names,
      axes,
      fill_value,
      erase_func=erase_func,
      num_threads=1,
      device_id=0,
  ):
      super(ErasePythonPipeline, self).__init__(
          batch_size,
          num_threads,
          device_id,
          exec_async=False,
          exec_pipelined=False,
      )
      self.iterator = iterator
      self.inputs = ops.ExternalSource()
      self.data_layout = data_layout
  
      if isinstance(fill_value, RandomDataIterator):
          self.fill_value_iterator = fill_value
          self.fill_value_inputs = ops.ExternalSource()
          fill_value = None
          function = partial(
              erase_func, anchor, shape, axis_names, axes, data_layout
          )
      else:
          self.fill_value_iterator = None
          function = partial(
              erase_func,
              anchor,
              shape,
              axis_names,
              axes,
              data_layout,
              fill_value,
          )
  
      self.erase = ops.PythonFunction(
          function=function, output_layouts=data_layout
      )
  
imports: from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import numpy
  from functools import partial
  from test_utils import compare_pipelines
  from test_utils import RandomDataIterator
label_desc: Use image node_id 1 to create a new ErasePythonPipeline object from inherited base classes: Pipeline with example: obj = ErasePythonPipeline(function, batch_size, data_layout, iterator, anchor, shape, axis_names, axes, fill_value, erase_func, num_threads, device_id)