docstr: Run whatever transformation on the given labels matrix
docstr_tok: ["Run","whatever","transformation","on","the","given","labels","matrix"]
code: def do_labels(self, labels, workspace):
      """Run whatever transformation on the given labels matrix"""
      if self.operation.value not in library_mapping.keys():
          raise NotImplementedError(
              "Unsupported operation: %s" % self.operation.value
          )
      if self.operation.value in [
          O_EXPAND_BY_MEASUREMENT,
          O_SHRINK_BY_MEASUREMENT,
      ]:
          m = workspace.measurements
          iterations = m.get_current_image_measurement(
              self.exp_shr_measurement.value
          )
      else:
          iterations = self.iterations.value
      return expand_or_shrink_objects(
          library_mapping[self.operation.value],
          labels,
          iterations=iterations,
          fill=self.wants_fill_holes.value,
      )
  
imports: from cellprofiler_core.module import Module
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.subscriber import LabelSubscriber
  from cellprofiler_core.setting.text import LabelName, Integer
  from cellprofiler_core.setting import Measurement
  from cellprofiler_core.utilities.core.module.identify import add_object_location_measurements, add_object_count_measurements, get_object_measurement_columns
  from cellprofiler_library.modules import expand_or_shrink_objects
  from cellprofiler.modules import _help
  import centrosome.cpmorphology
  import numpy
  import scipy.ndimage
  import cellprofiler_core.object
label_desc: Use image node_id 6 for calling the ExpandOrShrinkObjects obj's underlying member method code with example usage: obj.do_labels(labels, workspace) and returns: expand_or_shrink_objects