docstr: Adjust the # of functions to match the # of setting values
docstr_tok: ["Adjust","the","#","of","functions","to","match","the","#","of","setting","values"]
code: def prepare_settings(self, setting_values):
      """Adjust the # of functions to match the # of setting values"""
      assert (len(setting_values) - 2) % FUNCTION_SETTING_COUNT == 0
      function_count = (
          len(setting_values) - 2
      ) // FUNCTION_SETTING_COUNT
      del self.functions[function_count:]
      while len(self.functions) < function_count:
          self.add_function()
  
imports: import logging
  import centrosome.cpmorphology
  import centrosome.filter
  import numpy
  import scipy.ndimage
  from cellprofiler_core.image import Image
  from cellprofiler_core.module import Module
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting import Divider
  from cellprofiler_core.setting import SettingsGroup
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.do_something import DoSomething
  from cellprofiler_core.setting.do_something import RemoveSettingButton
  from cellprofiler_core.setting.subscriber import ImageSubscriber
  from cellprofiler_core.setting.text import ImageName, Integer
label_desc: Use image node_id 3 for calling the Morph obj's underlying member method code with example usage: obj.prepare_settings(setting_values) without return types