docstr: Upgrade pipeline settings from a previous revision
  
  setting_values - the text values of the module's settings
  
  variable_revision_number - revision # of module version that saved them
  
  Returns upgraded setting values, revision number and matlab flag
code: def upgrade_settings(
      self, setting_values, variable_revision_number, module_name
  ):
      """Upgrade pipeline settings from a previous revision
  
      setting_values - the text values of the module's settings
  
      variable_revision_number - revision # of module version that saved them
  
      Returns upgraded setting values, revision number and matlab flag
      """
      if variable_revision_number == 1:
          # Changed from yes/no for filter to a choice
          filter_choice = (
              FILTER_CHOICE_CUSTOM
              if setting_values[1] == "Yes"
              else FILTER_CHOICE_NONE
          )
          setting_values = (
              setting_values[:1] + [filter_choice] + setting_values[2:]
          )
          variable_revision_number = 2
      return setting_values, variable_revision_number
  
imports: import itertools
  import logging
  from cellprofiler_core.constants.measurement import C_SERIES_NAME, C_C, C_SERIES, C_Z, C_T
  from cellprofiler_core.pipeline import ImagePlane
  from cellprofiler_core.constants.module import FILTER_RULES_BUTTONS_HELP
  from cellprofiler_core.constants.modules.images import FILTER_CHOICE_ALL
  from cellprofiler_core.constants.modules.images import FILTER_CHOICE_CUSTOM
  from cellprofiler_core.constants.modules.images import FILTER_CHOICE_IMAGES
  from cellprofiler_core.constants.modules.images import FILTER_CHOICE_NONE
  from cellprofiler_core.constants.modules.images import FILTER_DEFAULT
  from cellprofiler_core.module import Module
  from cellprofiler_core.setting import FileCollectionDisplay
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting import PathListDisplay
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.do_something import PathListRefreshButton
  from cellprofiler_core.setting.do_something import PathListExtractButton
  from cellprofiler_core.setting.filter import DirectoryPredicate
  from cellprofiler_core.setting.filter import ExtensionPredicate
  from cellprofiler_core.setting.filter import FilePredicate
  from cellprofiler_core.setting.filter import Filter
  from cellprofiler_core.utilities.image import image_resource
  from cellprofiler_core.utilities.image import is_image
label_desc: Use image node_id 12 for calling the Images 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