code: def run(self, workspace):
      x_name = self.x_name.value
      y_name = self.y_name.value
      objects = workspace.object_set
      x = objects.get_objects(x_name)
      dimensions = x.dimensions
      x_data = x.segmented
  
      contours = (
          cellprofiler.utilities.morphology.morphological_gradient(
              x_data, self.structuring_element.value
          )
      )
      y_data = x_data * (contours == 0)
  
      if self.preserve_midpoints.value:
          missing_labels = numpy.setxor1d(x_data, y_data)
          if self.structuring_element.value_text == "Disk,1":
              y_data += x_data * numpy.isin(x_data, missing_labels)
          else:
              for label in missing_labels:
                  binary = x_data == label
                  midpoint = (
                      scipy.ndimage.morphology.distance_transform_edt(
                          binary
                      )
                  )
                  y_data[midpoint == numpy.max(midpoint)] = label
  
      if self.relabel_objects.value:
          y_data = skimage.morphology.label(y_data)
  
      y = Objects()
      y.segmented = y_data
      y.parent_image = x.parent_image
      objects.add_objects(y, y_name)
      self.add_measurements(workspace)
  
      if self.show_window:
          workspace.display_data.x_data = x_data
          workspace.display_data.y_data = y_data
          workspace.display_data.dimensions = dimensions
  
file_path: CellProfiler/src/frontend/cellprofiler/modules/erodeobjects.py
imports: import numpy
  import scipy.ndimage
  import skimage.measure
  import skimage.morphology
  from cellprofiler_core.module.image_segmentation import ObjectProcessing
  from cellprofiler_core.object import Objects
  from cellprofiler_core.setting import StructuringElement, Binary
  import cellprofiler.utilities.morphology
  from cellprofiler.modules._help import HELP_FOR_STREL
label_desc: Use image node_id 4 for calling the ErodeObjects obj's underlying member method code with example usage: obj.run(workspace) without return types