code: def erase_func(
      anchor, shape, axis_names, axes, layout, fill_value, image
  ):
      assert len(anchor) == len(shape)
  
      if not axes:
          axes = get_axes(layout, axis_names)
  
      if fill_value is None:
          fill_value = 0
  
      roi_starts, roi_ends = get_regions(
          image.shape, axes, anchor, shape
      )
      assert len(roi_starts) == len(roi_ends)
      for region_idx in range(len(roi_starts)):
          start = roi_starts[region_idx]
          end = roi_ends[region_idx]
          assert len(start) == len(end)
          if len(start) == 3:
              image[
                  start[0] : end[0],
                  start[1] : end[1],
                  start[2] : end[2],
              ] = fill_value
          elif len(start) == 4:
              image[
                  start[0] : end[0],
                  start[1] : end[1],
                  start[2] : end[2],
                  start[3] : end[3],
              ] = fill_value
          else:
              assert False
      return image
  
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 3 for calling a global function with example usage: erase_func(anchor, shape, axis_names, axes, layout, fill_value, image) and returns: image