docstr: Build a set of temporary threshold groups containing all the threshold methods to be tested
docstr_tok: ["Build","a","set","of","temporary","threshold","groups","containing","all","the","threshold","methods","to","be","tested"]
code: def build_threshold_parameter_list(self):
      """Build a set of temporary threshold groups containing all the threshold methods to be tested"""
  
      # Produce a list of meaningful combinations of threshold settings."""
      threshold_args = []
      object_fraction = [0.05, 0.25, 0.75, 0.95]
      # Produce list of combinations of the special thresholding method parameters: Otsu, MoG
      z = itertools.product(
          [centrosome.threshold.TM_OTSU],
          [0],
          [O_WEIGHTED_VARIANCE, O_ENTROPY],
          [O_THREE_CLASS],
          [O_FOREGROUND, O_BACKGROUND],
      )
      threshold_args += [i for i in z]
      z = itertools.product(
          [centrosome.threshold.TM_OTSU],
          [0],
          [O_WEIGHTED_VARIANCE, O_ENTROPY],
          [O_TWO_CLASS],
          [O_FOREGROUND],
      )
      threshold_args += [i for i in z]
      z = itertools.product(
          [centrosome.threshold.TM_MOG],
          object_fraction,
          [O_WEIGHTED_VARIANCE],
          [O_TWO_CLASS],
          [O_FOREGROUND],
      )
      threshold_args += [i for i in z]
      # Tack on the remaining simpler methods
      leftover_methods = [
          i
          for i in centrosome.threshold.TM_METHODS
          if i
          not in [
              centrosome.threshold.TM_OTSU,
              centrosome.threshold.TM_MOG,
          ]
      ]
      z = itertools.product(
          leftover_methods,
          [0],
          [O_WEIGHTED_VARIANCE],
          [O_TWO_CLASS],
          [O_FOREGROUND],
      )
      threshold_args += [i for i in z]
  
      # Assign the threshold values to a temporary threshold group
      threshold_groups = []
      for (
          threshold_method,
          object_fraction,
          use_weighted_variance,
          two_class_otsu,
          assign_middle_to_foreground,
      ) in threshold_args:
          threshold_groups.append(self.add_threshold_group(None, False))
          threshold_groups[-1].threshold_method.value = threshold_method
          threshold_groups[-1].object_fraction.value = object_fraction
          threshold_groups[-1].two_class_otsu.value = two_class_otsu
          threshold_groups[
              -1
          ].use_weighted_variance.value = use_weighted_variance
          threshold_groups[
              -1
          ].assign_middle_to_foreground.value = (
              assign_middle_to_foreground
          )
  
      return threshold_groups
  
imports: import itertools
  import logging
  import cellprofiler_core.utilities.image
  import centrosome.cpmorphology
  import centrosome.haralick
  import centrosome.radial_power_spectrum
  import centrosome.threshold
  import centrosome.threshold
  import numpy
  import scipy.linalg.basic
  import scipy.ndimage
  from cellprofiler_core.constants.image import C_SCALING
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT, EXPERIMENT, MCA_AVAILABLE_POST_RUN
  from cellprofiler_core.constants.module._identify import O_WEIGHTED_VARIANCE, O_ENTROPY, O_FOREGROUND, O_BACKGROUND
  from cellprofiler_core.module import Module
  from cellprofiler_core.preferences import get_headless
  from cellprofiler_core.setting import Divider, HiddenCount, SettingsGroup, Binary, ValidationError
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.do_something import DoSomething, RemoveSettingButton
  from cellprofiler_core.setting.subscriber import ImageListSubscriber
  from cellprofiler_core.setting.text import ImageName, Integer, Float
  from cellprofiler.modules.threshold import O_THREE_CLASS, O_TWO_CLASS
label_desc: Use image node_id 37 for calling the MeasureImageQuality obj's underlying member method code with example usage: obj.build_threshold_parameter_list() and returns: threshold_groups