code: def create_settings(self):
      self.object_name_GT = LabelSubscriber(
          "Select the objects to be used as the ground truth basis for calculating the amount of overlap",
          "None",
          doc="""\
  Choose which set of objects will used as the “ground truth” objects. It
  can be the product of segmentation performed by hand, or the result of
  another segmentation algorithm whose results you would like to compare.
  See the **Load** modules for more details on loading objects.""",
      )
  
      self.object_name_ID = LabelSubscriber(
          "Select the objects to be tested for overlap against the ground truth",
          "None",
          doc="""\
  This set of objects is what you will compare with the ground truth
  objects. It is known as the “test object.”""",
      )
  
      self.wants_emd = Binary(
          "Calculate earth mover's distance?",
          False,
          doc="""\
  The earth mover’s distance computes the shortest distance that would
  have to be travelled to move each foreground pixel in the test object to
  some foreground pixel in the reference object. “Earth mover’s” refers to
  an analogy: the pixels are “earth” that has to be moved by some machine
  at the smallest possible cost.
  It would take too much memory and processing time to compute the exact
  earth mover’s distance, so **MeasureObjectOverlap** chooses
  representative foreground pixels in each object and assigns each
  foreground pixel to its closest representative. The earth mover’s
  distance is then computed for moving the foreground pixels associated
  with each representative in the test object to those in the reference
  object.""",
      )
  
      self.max_points = Integer(
          "Maximum # of points",
          value=250,
          minval=100,
          doc="""\
  *(Used only when computing the earth mover’s distance)*
  
  This is the number of representative points that will be taken from the
  foreground of the test objects and from the foreground of the reference
  objects using the point selection method (see below).""",
      )
  
      self.decimation_method = Choice(
          "Point selection method",
          choices=[DM_KMEANS, DM_SKEL],
          doc="""\
  *(Used only when computing the earth mover’s distance)*
  
  The point selection setting determines how the representative points
  are chosen.
  
  -  *{DM_KMEANS}:* Select to pick representative points using a K-Means
     clustering technique. The foregrounds of both objects are combined and
     representatives are picked that minimize the distance to the nearest
     representative. The same representatives are then used for the test
     and reference objects.
  -  *{DM_SKEL}:* Select to skeletonize the object and pick points
     equidistant along the skeleton.
  
  |image0|  *{DM_KMEANS}* is a choice that’s generally applicable to all
  images. *{DM_SKEL}* is best suited to long, skinny objects such as
  worms or neurites.
  
  .. |image0| image:: {PROTIP_RECOMMEND_ICON}
  """.format(
              **{
                  "DM_KMEANS": DM_KMEANS,
                  "DM_SKEL": DM_SKEL,
                  "PROTIP_RECOMMEND_ICON": _help.PROTIP_RECOMMEND_ICON,
              }
          ),
      )
  
      self.max_distance = Integer(
          "Maximum distance",
          value=250,
          minval=1,
          doc="""\
  *(Used only when computing the earth mover’s distance)*
  
  This setting sets an upper bound to the distance penalty assessed during
  the movement calculation. As an example, the score for moving 10 pixels
  from one location to a location that is 100 pixels away is 10\*100, but
  if the maximum distance were set to 50, the score would be 10\*50
  instead.
  
  The maximum distance should be set to the largest reasonable distance
  that pixels could be expected to move from one object to the next.""",
      )
  
      self.penalize_missing = Binary(
          "Penalize missing pixels",
          value=False,
          doc="""\
  *(Used only when computing the earth mover’s distance)*
  
  If one object has more foreground pixels than the other, the earth
  mover’s distance is not well-defined because there is no destination for
  the extra source pixels or vice-versa. It’s reasonable to assess a
  penalty for the discrepancy when comparing the accuracy of a
  segmentation because the discrepancy represents an error. It’s also
  reasonable to assess no penalty if the goal is to compute the cost of
  movement, for example between two frames in a time-lapse movie, because
  the discrepancy is likely caused by noise or artifacts in segmentation.
  Set this setting to “Yes” to assess a penalty equal to the maximum
  distance times the absolute difference in number of foreground pixels in
  the two objects. Set this setting to “No” to assess no penalty.""",
      )
  
imports: from functools import reduce
  import centrosome.cpmorphology
  import centrosome.fastemd
  import centrosome.filter
  import centrosome.index
  import centrosome.propagate
  import numpy
  import scipy.ndimage
  import scipy.sparse
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  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 Integer
  from cellprofiler.modules import _help
label_desc: Use image node_id 1 for calling the MeasureObjectOverlap obj's underlying member method code with example usage: obj.create_settings() without return types