docstr: Adjust setting values if they came from a previous revision
  
  setting_values - a sequence of strings representing the settings
                   for the module as stored in the pipeline
  variable_revision_number - the variable revision number of the
                   module at the time the pipeline was saved. Use this
                   to determine how the incoming setting values map
                   to those of the current module version.
  module_name - the name of the module that did the saving. This can be
                used to import the settings from another module if
                that module was merged into the current module
docstr_tok: ["Adjust","setting","values","if","they","came","from","a","previous","revision","setting_values","-","a","sequence","of","strings","representing","the","settings","for","the","module","as","stored","in","the","pipeline","variable_revision_number","-","the","variable","revision","number","of","the","module","at","the","time","the","pipeline","was","saved",".","Use","this","to","determine","how","the","incoming","setting","values","map","to","those","of","the","current","module","version",".","module_name","-","the","name","of","the","module","that","did","the","saving",".","This","can","be","used","to","import","the","settings","from","another","module","if","that","module","was","merged","into","the","current","module"]
code: def upgrade_settings(
      self, setting_values, variable_revision_number, module_name
  ):
      """Adjust setting values if they came from a previous revision
  
      setting_values - a sequence of strings representing the settings
                       for the module as stored in the pipeline
      variable_revision_number - the variable revision number of the
                       module at the time the pipeline was saved. Use this
                       to determine how the incoming setting values map
                       to those of the current module version.
      module_name - the name of the module that did the saving. This can be
                    used to import the settings from another module if
                    that module was merged into the current module
      """
      if variable_revision_number == 1:
          # Change shape_choice names: Rectangle > Rectangle Forced Location, Natural Shape > Natural Shape and Location
          if setting_values[2] == "Rectangle":
              setting_values[2] = SHAPE_RECTANGLE
          elif setting_values[2] == "Natural Shape":
              setting_values[2] = SHAPE_NATURAL
          variable_revision_number = 2
  
      if variable_revision_number == 2:
          setting_values = setting_values[:-2]
          variable_revision_number = 3
  
      return setting_values, variable_revision_number
  
imports: from cellprofiler_core.constants.module import HELP_ON_MEASURING_DISTANCES
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.subscriber import LabelSubscriber, GridSubscriber
  from cellprofiler_core.setting.text import LabelName, Integer
  from cellprofiler_core.utilities.core.module.identify import add_object_location_measurements, add_object_count_measurements, get_object_measurement_columns
  from cellprofiler.modules import _help
  import numpy
  from centrosome.cpmorphology import centers_of_labels
  from cellprofiler_core.utilities.grid import Grid
  from cellprofiler_core.module import Module
  from cellprofiler_core.object import Objects
label_desc: Use image node_id 17 for calling the IdentifyObjectsInGrid 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