code: def upgrade_settings(
      self, setting_values, variable_revision_number, module_name
  ):
      if variable_revision_number == 1:
          n_images, n_objects, n_bins = [
              int(setting) for setting in setting_values[:3]
          ]
  
          off_bins = (
              SETTINGS_STATIC_COUNT
              + n_images * SETTINGS_IMAGE_GROUP_COUNT
              + n_objects * SETTINGS_OBJECT_GROUP_COUNT
          )
  
          new_setting_values = setting_values[:off_bins]
  
          for bin_count in setting_values[off_bins:]:
              new_setting_values += ["Yes", bin_count, "100"]
  
          setting_values = new_setting_values
  
          variable_revision_number = 2
  
      if variable_revision_number == 2:
          n_images, n_objects = [
              int(setting) for setting in setting_values[:2]
          ]
  
          off_objects = (
              SETTINGS_STATIC_COUNT
              + n_images * SETTINGS_IMAGE_GROUP_COUNT
          )
  
          setting_values = list(setting_values)
  
          for i in range(n_objects):
              offset = (
                  off_objects
                  + i * SETTINGS_OBJECT_GROUP_COUNT
                  + SETTINGS_CENTER_CHOICE_OFFSET
              )
  
              if setting_values[offset] == C_CENTERS_OF_OTHER_V2:
                  setting_values[offset] = C_CENTERS_OF_OTHER
  
          variable_revision_number = 3
  
      if variable_revision_number == 3:
          # added heatmaps
          # Need a heatmap_count = 0
          #
          setting_values = (
              setting_values[:3] + ["0"] + setting_values[3:]
          )
  
          variable_revision_number = 4
  
      if variable_revision_number == 4:
          #
          # Added zernikes
          #
          setting_values = (
              setting_values[:4] + [Z_NONE, "9"] + setting_values[4:]
          )
  
          variable_revision_number = 5
  
      if variable_revision_number == 5:
          n_images = int(setting_values[0])
          mid = setting_values[1:6]
          end = setting_values[6 + n_images :]
  
          images_set = set(setting_values[6 : 6 + n_images])
          if "None" in images_set:
              images_set.remove("None")
          images_string = ", ".join(map(str, images_set))
  
          setting_values = [images_string] + mid + end
  
          variable_revision_number = 6
  
      return setting_values, variable_revision_number
  
imports: import centrosome.cpmorphology
  import centrosome.propagate
  import centrosome.zernike
  import matplotlib.cm
  import numpy
  import numpy.ma
  import scipy.ndimage
  import scipy.sparse
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  from cellprofiler_core.image import Image
  from cellprofiler_core.module import Module
  from cellprofiler_core.preferences import get_default_colormap
  from cellprofiler_core.setting import HiddenCount, Divider, SettingsGroup, Binary, ValidationError
  from cellprofiler_core.setting.choice import Choice, Colormap
  from cellprofiler_core.setting.do_something import DoSomething, RemoveSettingButton
  from cellprofiler_core.setting.subscriber import LabelSubscriber, ImageListSubscriber, ImageSubscriber
  from cellprofiler_core.setting.text import Integer, ImageName
  from cellprofiler_core.utilities.core.object import crop_labels_and_image, size_similarly
  import cellprofiler.gui.help.content
label_desc: Use image node_id 21 for calling the MeasureObjectIntensityDistribution obj's underlying member method code with example usage: obj.upgrade_settings(setting_values, variable_revision_number, module_name) and returns: setting_values,  variable_revision_number