code: def upgrade_settings(
      self, setting_values, variable_revision_number, module_name
  ):
      if variable_revision_number < 10:
          raise NotImplementedError(
              "Automatic upgrade for this module is not supported in CellProfiler 3."
          )
  
      if variable_revision_number == 10:
          setting_values = list(setting_values)
          if setting_values[OFF_FILL_HOLES_V10] == "No":
              setting_values[OFF_FILL_HOLES_V10] = FH_NEVER
          elif setting_values[OFF_FILL_HOLES_V10] == "Yes":
              setting_values[OFF_FILL_HOLES_V10] = FH_THRESHOLDING
          variable_revision_number = 11
  
      if variable_revision_number == 11:
          if setting_values[6] == UN_LOG:
              setting_values[6] = UN_INTENSITY
  
          if setting_values[20] == LIMIT_TRUNCATE:
              setting_values[20] = "None"
  
          new_setting_values = setting_values[:4]
  
          new_setting_values += setting_values[5:11]
  
          new_setting_values += setting_values[12:15]
  
          new_setting_values += setting_values[20:]
  
          setting_values = new_setting_values
  
          variable_revision_number = 12
  
      if variable_revision_number == 12:
          new_setting_values = setting_values[: OFF_N_SETTINGS - 1]
          new_setting_values += ["Yes"]
          new_setting_values += setting_values[OFF_N_SETTINGS - 1 :]
  
          setting_values = new_setting_values
  
          variable_revision_number = 13
  
      if variable_revision_number == 13:
          # Added maxima settings
          new_setting_values = setting_values[:15]
          new_setting_values += ["No", DEFAULT_MAXIMA_COLOR]
          new_setting_values += setting_values[15:]
  
          setting_values = new_setting_values
  
          variable_revision_number = 14
  
      if variable_revision_number == 14:
          # Removed maxima settings
          new_setting_values = setting_values[:15]
          new_setting_values += setting_values[17:]
  
          setting_values = new_setting_values
  
          variable_revision_number = 15
  
      threshold_setting_values = setting_values[N_SETTINGS:]
  
      threshold_settings_version = int(threshold_setting_values[0])
  
      if threshold_settings_version < 4:
          threshold_setting_values = (
              self.threshold.upgrade_threshold_settings(
                  threshold_setting_values
              )
          )
  
          threshold_settings_version = 9
  
      (
          threshold_upgrade_settings,
          threshold_settings_version,
      ) = self.threshold.upgrade_settings(
          ["None", "None"] + threshold_setting_values[1:],
          threshold_settings_version,
          "Threshold",
      )
  
      threshold_upgrade_settings = [
          str(threshold_settings_version)
      ] + threshold_upgrade_settings[2:]
  
      setting_values = (
          setting_values[:N_SETTINGS] + threshold_upgrade_settings
      )
  
      return setting_values, variable_revision_number
  
imports: import math
  import cellprofiler_core.module.image_segmentation
  import cellprofiler_core.object
  import centrosome.cpmorphology
  import centrosome.outline
  import centrosome.propagate
  import centrosome.threshold
  import numpy
  import scipy.ndimage
  import scipy.sparse
  import skimage.morphology
  import skimage.segmentation
  from cellprofiler_core.setting import Binary, Color
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.range import IntegerRange
  from cellprofiler_core.setting.text import Integer, Float
  import cellprofiler.gui.help
  import cellprofiler.gui.help.content
  from cellprofiler.modules import _help, threshold
label_desc: Use image node_id 5 for calling the IdentifyPrimaryObjects 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