code: def create_settings(self):
      self.ground_truth = ImageSubscriber(
          "Select the image to be used as the ground truth basis for calculating the amount of overlap",
          "None",
          doc="""\
  This binary (black and white) image is known as the “ground truth”
  image. It can be the product of segmentation performed by hand, or the
  result of another segmentation algorithm whose results you would like to
  compare.""",
      )
  
      self.test_img = ImageSubscriber(
          "Select the image to be used to test for overlap",
          "None",
          doc="""\
  This binary (black and white) image is what you will compare with the
  ground truth image. It is known as the “test image”.""",
      )
  
      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 image to
  some foreground pixel in the reference image. “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 **MeasureImageOverlap** chooses
  representative foreground pixels in each image 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 image to those in the reference
  image.""",
      )
  
      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 image and from the foreground of the reference
  image using the point selection method (see below).""",
      )
  
      self.decimation_method = Choice(
          "Point selection method",
          choices=DM,
          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 images 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 images.
  -  *{DM_SKEL}:* Select to skeletonize the image 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.value,
                  "DM_SKEL": DM.SKELETON.value,
                  "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 image to the next.""",
      )
  
      self.penalize_missing = Binary(
          "Penalize missing pixels",
          value=False,
          doc="""\
  *(Used only when computing the earth mover’s distance)*
  
  If one image 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 images. Set this setting to “No” to assess no penalty.""",
      )
  
imports: from cellprofiler.modules import _help
  from cellprofiler_library.modules import measureimageoverlap
  from cellprofiler_library.opts.measureimageoverlap import DM
  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 ImageSubscriber
  from cellprofiler_core.setting.text import Integer
label_desc: Use image node_id 1 for calling the MeasureImageOverlap obj's underlying member method code with example usage: obj.create_settings() without return types