code: def create_settings(self):
      self.object_name = LabelSubscriber(
          "Select the input objects",
          "None",
          doc="Select the objects that you want to expand or shrink.",
      )
  
      self.output_object_name = LabelName(
          "Name the output objects",
          "ShrunkenNuclei",
          doc="Enter a name for the resulting objects.",
      )
  
      self.operation = Choice(
          "Select the operation",
          O_ALL,
          doc="""\
  Choose the operation that you want to perform:
  
  -  *{O_SHRINK_INF}:* Remove all pixels but one from filled objects.
     Thin objects with holes to loops unless the “fill” option is checked.
     Objects are never lost using this module (shrinking stops when an
     object becomes a single pixel).
  -  *{O_EXPAND_INF}:* Expand objects, assigning every pixel in the
     image to an object. Background pixels are assigned to the nearest
     object.
  -  *{O_DIVIDE}:* Remove pixels from an object that are adjacent to
     another object’s pixels unless doing so would change the object’s
     Euler number (break an object in two, remove the object completely or
     open a hole in an object).
  -  *{O_SHRINK}:* Remove pixels around the perimeter of an object unless
     doing so would change the object’s Euler number (break the object in
     two, remove the object completely or open a hole in the object). You
     can specify the number of times perimeter pixels should be removed.
     Processing stops automatically when there are no more pixels to
     remove. Objects are never lost using this module (shrinking
     stops when an object becomes a single pixel).
  -  *{O_SHRINK_BY_MEASUREMENT}:* Shrink an object by some previously calculated
     measurement. This measurement can be the output of some other module
     or can be a value loaded by the **Metadata** module. An object will 
     never be shrunk to less than one pixel.
  -  *{O_EXPAND}:* Expand each object by adding background pixels
     adjacent to the image. You can choose the number of times to expand.
     Processing stops automatically if there are no more background
     pixels.
  -  *{O_EXPAND_BY_MEASUREMENT}:* Expand an object by some previously calculated
     measurement. This measurement can be the output of some other module
     or can be a value loaded by the **Metadata** module.
  -  *{O_SKELETONIZE}:* Erode each object to its skeleton.
  -  *{O_SPUR}:* Remove or reduce the length of spurs in a skeletonized
     image. The algorithm reduces spur size by the number of pixels
     indicated in the setting *Number of pixels by which to expand or
     shrink*.
  """.format(
              **{
                  "O_DIVIDE": O_DIVIDE,
                  "O_EXPAND": O_EXPAND,
                  "O_EXPAND_BY_MEASUREMENT": O_EXPAND_BY_MEASUREMENT,
                  "O_EXPAND_INF": O_EXPAND_INF,
                  "O_SHRINK": O_SHRINK,
                  "O_SHRINK_BY_MEASUREMENT": O_SHRINK_BY_MEASUREMENT,
                  "O_SHRINK_INF": O_SHRINK_INF,
                  "O_SKELETONIZE": O_SKELETONIZE,
                  "O_SPUR": O_SPUR,
              }
          ),
      )
  
      self.iterations = Integer(
          "Number of pixels by which to expand or shrink",
          1,
          minval=1,
          doc="""\
  *(Used only if "{O_SHRINK}", "{O_EXPAND}", or "{O_SPUR}" is selected)*
  
  Specify the number of pixels to add or remove from object borders.
  """.format(
              **{
                  "O_EXPAND": O_EXPAND,
                  "O_SHRINK": O_SHRINK,
                  "O_SPUR": O_SPUR,
              }
          ),
      )
  
      self.wants_fill_holes = Binary(
          "Fill holes in objects so that all objects shrink to a single point?",
          False,
          doc="""\
  *(Used only if one of the “Shrink” options selected)*
  
  Select *{YES}* to ensure that each object will shrink to a single
  point, by filling the holes in each object.
  
  Select *{NO}* to preserve the Euler number. In this case, the shrink
  algorithm preserves each object’s Euler number, which means that it will
  erode an object with a hole to a ring in order to keep the hole. An
  object with two holes will be shrunk to two rings connected by a line in
  order to keep from breaking up the object or breaking the hole.
  """.format(
              **{"NO": "No", "YES": "Yes"}
          ),
      )
      self.exp_shr_measurement = Measurement(
          "Expand or shrink measurement",
          lambda: "Image",
          doc="""\
  *(Used only if “{O_SHRINK_BY_MEASUREMENT}” or "{O_EXPAND_BY_MEASUREMENT}" is selected)*
  Select the measurement value to use as the divisor for the final image.
  """.format(
              **{
                  "O_SHRINK_BY_MEASUREMENT": O_SHRINK_BY_MEASUREMENT,
                  "O_EXPAND_BY_MEASUREMENT": O_EXPAND_BY_MEASUREMENT,
              }
          ),
      )
  
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 1 for calling the ExpandOrShrinkObjects obj's underlying member method code with example usage: obj.create_settings() without return types