code: def add_scale_group(self, image_group, can_remove=True):
      group = SettingsGroup()
      image_group.scale_groups.append(group)
  
      group.image_names = image_group.image_names
  
      group.append("divider", Divider(line=False))
  
      group.append(
          "scale",
          Integer(
              text="Spatial scale for blur measurements",
              value=len(image_group.scale_groups) * 10 + 10,
              doc="""\
  *(Used only if blur measurements are to be calculated)*
  
  Enter an integer for the window size *N*, in units of pixels.
  The *{F_LOCAL_FOCUS_SCORE}* is measured within an *N × N* pixel
  window applied to the image, and the *{F_CORRELATION}* of a
  pixel is measured with respect to its neighbors *N* pixels away.
  
  A higher number for the window size *N* measures larger patterns of image
  blur whereas smaller numbers measure more localized patterns of blur. We
  suggest selecting a window size that is on the order of the feature of
  interest (e.g., the object diameter). You can measure these metrics for
  multiple window sizes by selecting additional scales for each image.
  """.format(
                  **{
                      "F_LOCAL_FOCUS_SCORE": F_LOCAL_FOCUS_SCORE,
                      "F_CORRELATION": F_CORRELATION,
                  }
              ),
          ),
      )
  
      group.can_remove = can_remove
      if can_remove:
          group.append(
              "remove_button",
              RemoveSettingButton(
                  "",
                  "Remove this scale",
                  image_group.scale_groups,
                  group,
              ),
          )
  
imports: import itertools
  import logging
  import cellprofiler_core.utilities.image
  import centrosome.cpmorphology
  import centrosome.haralick
  import centrosome.radial_power_spectrum
  import centrosome.threshold
  import centrosome.threshold
  import numpy
  import scipy.linalg.basic
  import scipy.ndimage
  from cellprofiler_core.constants.image import C_SCALING
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT, EXPERIMENT, MCA_AVAILABLE_POST_RUN
  from cellprofiler_core.constants.module._identify import O_WEIGHTED_VARIANCE, O_ENTROPY, O_FOREGROUND, O_BACKGROUND
  from cellprofiler_core.module import Module
  from cellprofiler_core.preferences import get_headless
  from cellprofiler_core.setting import Divider, HiddenCount, SettingsGroup, Binary, ValidationError
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.do_something import DoSomething, RemoveSettingButton
  from cellprofiler_core.setting.subscriber import ImageListSubscriber
  from cellprofiler_core.setting.text import ImageName, Integer, Float
  from cellprofiler.modules.threshold import O_THREE_CLASS, O_TWO_CLASS
label_desc: Use image node_id 3 for calling the MeasureImageQuality obj's underlying member method code with example usage: obj.add_scale_group(image_group, can_remove) without return types