code: def test_zeros():
      """Test all combinations of options with an image of all zeros"""
      for image in (numpy.zeros((10, 10)), numpy.zeros((10, 10, 3))):
          pipeline = cellprofiler_core.pipeline.Pipeline()
          pipeline.add_listener(error_callback)
          inj_module = (
              cellprofiler_core.modules.injectimage.InjectImage(
                  "MyImage", image
              )
          )
          inj_module.set_module_num(1)
          pipeline.add_module(inj_module)
          module = (
              cellprofiler.modules.correctilluminationcalculate.CorrectIlluminationCalculate()
          )
          module.set_module_num(2)
          pipeline.add_module(module)
          module.image_name.value = "MyImage"
          module.illumination_image_name.value = "OutputImage"
          module.save_average_image.value = True
          module.save_dilated_image.value = True
  
          for ea in (
              cellprofiler.modules.correctilluminationcalculate.EA_EACH,
              cellprofiler.modules.correctilluminationcalculate.EA_ALL_ACROSS,
              cellprofiler.modules.correctilluminationcalculate.EA_ALL_FIRST,
          ):
              module.each_or_all.value = ea
              for intensity_choice in (
                  cellprofiler.modules.correctilluminationcalculate.IC_BACKGROUND,
                  cellprofiler.modules.correctilluminationcalculate.IC_REGULAR,
              ):
                  module.intensity_choice.value = intensity_choice
                  for dilate_objects in (True, False):
                      module.dilate_objects.value = dilate_objects
                      for rescale_option in (
                          "Yes",
                          "No",
                          cellprofiler.modules.correctilluminationcalculate.RE_MEDIAN,
                      ):
                          module.rescale_option.value = rescale_option
                          for smoothing_method in (
                              cellprofiler.modules.correctilluminationcalculate.SM_NONE,
                              cellprofiler.modules.correctilluminationcalculate.SM_FIT_POLYNOMIAL,
                              cellprofiler.modules.correctilluminationcalculate.SM_GAUSSIAN_FILTER,
                              cellprofiler.modules.correctilluminationcalculate.SM_MEDIAN_FILTER,
                              cellprofiler.modules.correctilluminationcalculate.SM_TO_AVERAGE,
                              cellprofiler.modules.correctilluminationcalculate.SM_SPLINES,
                              cellprofiler.modules.correctilluminationcalculate.SM_CONVEX_HULL,
                          ):
                              module.smoothing_method.value = (
                                  smoothing_method
                              )
                              for ow in (
                                  cellprofiler.modules.correctilluminationcalculate.FI_AUTOMATIC,
                                  cellprofiler.modules.correctilluminationcalculate.FI_MANUALLY,
                                  cellprofiler.modules.correctilluminationcalculate.FI_OBJECT_SIZE,
                              ):
                                  module.automatic_object_width.value = (
                                      ow
                                  )
                                  measurements = (
                                      cellprofiler_core.measurement.Measurements()
                                  )
                                  image_set_list = (
                                      cellprofiler_core.image.ImageSetList()
                                  )
                                  workspace = cellprofiler_core.workspace.Workspace(
                                      pipeline,
                                      None,
                                      None,
                                      None,
                                      measurements,
                                      image_set_list,
                                  )
                                  pipeline.prepare_run(workspace)
                                  inj_module.prepare_group(
                                      workspace, {}, [1]
                                  )
                                  module.prepare_group(
                                      workspace, {}, [1]
                                  )
                                  image_set = (
                                      image_set_list.get_image_set(0)
                                  )
                                  object_set = (
                                      cellprofiler_core.object.ObjectSet()
                                  )
                                  workspace = cellprofiler_core.workspace.Workspace(
                                      pipeline,
                                      inj_module,
                                      image_set,
                                      object_set,
                                      measurements,
                                      image_set_list,
                                  )
                                  inj_module.run(workspace)
                                  module.run(workspace)
                                  image = image_set.get_image(
                                      "OutputImage"
                                  )
                                  assert image is not None
                                  assert numpy.all(
                                      image.pixel_data == 0
                                  ), (
                                      """Failure case:
                              intensity_choice = %(intensity_choice)s
                              dilate_objects = %(dilate_objects)s
                              rescale_option = %(rescale_option)s
                              smoothing_method = %(smoothing_method)s
                              automatic_object_width = %(ow)s"""
                                      % locals()
                                  )
  
imports: import numpy
  import pytest
  from centrosome.bg_compensate import MODE_AUTO, MODE_BRIGHT, MODE_DARK, MODE_GRAY
  from six.moves import StringIO
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler.modules.correctilluminationcalculate
  import cellprofiler_core.modules.injectimage
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.setting
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 3 for calling a global function with example usage: test_zeros() without return types