code: def test_regression_holes():
      """Regression test - fill holes caused by filtered object
  
      This was created as a regression test for the bug, IMG-191, but
      didn't exercise the bug. It's a good test of watershed and filling
      labeled holes in an odd case, so I'm leaving it in.
      """
      #
      # This array has two intensity peaks separated by a border.
      # You should get two objects, one within the other.
      #
      pixels = (
          numpy.array(
              [
                  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
                  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
                  [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
                  [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
                  [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
                  [0, 0, 2, 1, 1, 1, 1, 1, 1, 2, 0, 0],
                  [0, 0, 2, 1, 2, 2, 2, 2, 1, 2, 0, 0],
                  [0, 0, 2, 1, 2, 9, 2, 2, 1, 2, 0, 0],
                  [0, 0, 2, 1, 2, 2, 2, 2, 1, 2, 0, 0],
                  [0, 0, 2, 1, 1, 1, 1, 1, 1, 2, 0, 0],
                  [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
                  [0, 0, 2, 2, 1, 2, 2, 2, 2, 2, 0, 0],
                  [0, 0, 2, 2, 1, 2, 2, 2, 2, 2, 0, 0],
                  [0, 0, 2, 2, 1, 2, 2, 2, 2, 2, 0, 0],
                  [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
                  [0, 0, 2, 2, 2, 2, 2, 2, 9, 9, 0, 0],
                  [0, 0, 2, 2, 2, 2, 2, 2, 9, 9, 0, 0],
                  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
                  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
              ],
              float,
          )
          / 10.0
      )
      expected = numpy.array(
          [
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
              [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
              [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
              [0, 0, 2, 1, 1, 1, 1, 1, 1, 2, 0, 0],
              [0, 0, 2, 1, 1, 1, 1, 1, 1, 2, 0, 0],
              [0, 0, 2, 1, 1, 1, 1, 1, 1, 2, 0, 0],
              [0, 0, 2, 1, 1, 1, 1, 1, 1, 2, 0, 0],
              [0, 0, 2, 1, 1, 1, 1, 1, 1, 2, 0, 0],
              [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
              [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
              [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
              [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
              [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
              [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
              [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          ]
      )
      mask = numpy.array(
          [
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0],
              [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],
              [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],
              [0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0],
              [0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0],
              [0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0],
              [0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0],
              [0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0],
              [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],
              [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],
              [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],
              [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],
              [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],
              [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],
              [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          ],
          bool,
      )
      workspace, x = make_workspace(pixels)
      x.use_advanced.value = True
      x.exclude_size.value = True
      x.size_range.min = 6
      x.size_range.max = 50
      x.maxima_suppression_size.value = 3
      x.automatic_suppression.value = False
      x.watershed_method.value = (
          cellprofiler.modules.identifyprimaryobjects.WA_INTENSITY
      )
      x.threshold.threshold_scope.value = (
          cellprofiler.modules.threshold.TS_GLOBAL
      )
      x.threshold.global_operation.value = (
          cellprofiler.modules.threshold.TM_MANUAL
      )
      x.threshold.threshold_smoothing_scale.value = 0
      x.threshold.manual_threshold.value = 0.05
      x.threshold.threshold_correction_factor.value = 1
      measurements = workspace.measurements
      x.run(workspace)
      my_objects = workspace.object_set.get_objects(OBJECTS_NAME)
      assert my_objects.segmented[3, 3] != 0
      if my_objects.unedited_segmented[3, 3] == 2:
          unedited_segmented = my_objects.unedited_segmented
      else:
          unedited_segmented = numpy.array([0, 2, 1])[
              my_objects.unedited_segmented
          ]
      assert numpy.all(unedited_segmented[mask] == expected[mask])
  
imports: import io
  import os
  import centrosome.threshold
  import numpy
  import pytest
  import scipy.ndimage
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import FF_COUNT, COLTYPE_INTEGER, FF_FINAL_THRESHOLD, COLTYPE_FLOAT, FF_ORIG_THRESHOLD, M_NUMBER_OBJECT_NUMBER, M_LOCATION_CENTER_X, M_LOCATION_CENTER_Y, M_LOCATION_CENTER_Z, FF_SUM_OF_ENTROPIES, FF_WEIGHTED_VARIANCE
  from cellprofiler_core.constants.module._identify import TS_GLOBAL, TS_ADAPTIVE, O_TWO_CLASS, O_FOREGROUND, O_THREE_CLASS, O_BACKGROUND, RB_MODE, RB_SD, RB_MEAN, RB_MEDIAN, RB_MAD, TS_MANUAL, TS_MEASUREMENT
  from cellprofiler_core.image import VanillaImage
  import cellprofiler.modules.identifyprimaryobjects
  import cellprofiler.modules.threshold
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.setting
  import cellprofiler_core.workspace
  import tests.frontend
  import tests.frontend.modules
label_desc: Use image node_id 32 for calling a global function with example usage: test_regression_holes() without return types