code: def test_filter_edge():
      labels = numpy.array(
          [
              [0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0],
              [0, 0, 1, 0, 0],
              [0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0],
          ]
      )
      image = numpy.array(
          [
              [0, 0, 0.5, 0, 0],
              [0, 0.5, 0.5, 0.5, 0],
              [0, 0.5, 0.5, 0.5, 0],
              [0, 0.5, 0.5, 0.5, 0],
              [0, 0, 0, 0, 0],
          ]
      )
      expected_unedited = numpy.array(
          [
              [0, 0, 1, 0, 0],
              [0, 1, 1, 1, 0],
              [0, 1, 1, 1, 0],
              [0, 1, 1, 1, 0],
              [0, 0, 0, 0, 0],
          ]
      )
  
      p = cellprofiler_core.pipeline.Pipeline()
      o_s = cellprofiler_core.object.ObjectSet()
      i_l = cellprofiler_core.image.ImageSetList()
      image = cellprofiler_core.image.Image(image)
      objects = cellprofiler_core.object.Objects()
      objects.unedited_segmented = labels
      objects.small_removed_segmented = labels
      objects.segmented = labels
      o_s.add_objects(objects, INPUT_OBJECTS_NAME)
      i_s = i_l.get_image_set(0)
      i_s.add(IMAGE_NAME, image)
      m = cellprofiler_core.measurement.Measurements()
      module = (
          cellprofiler.modules.identifysecondaryobjects.IdentifySecondaryObjects()
      )
      module.x_name.value = INPUT_OBJECTS_NAME
      module.y_name.value = OUTPUT_OBJECTS_NAME
      module.image_name.value = IMAGE_NAME
      module.method.value = (
          cellprofiler.modules.identifysecondaryobjects.M_PROPAGATION
      )
      module.wants_discard_edge.value = True
      module.wants_discard_primary.value = True
      module.new_primary_objects_name.value = NEW_OBJECTS_NAME
      module.set_module_num(1)
      p.add_module(module)
      workspace = cellprofiler_core.workspace.Workspace(
          p, module, i_s, o_s, m, i_l
      )
      module.threshold.threshold_scope.value = TS_GLOBAL
      module.threshold.global_operation.value = (
          centrosome.threshold.TM_OTSU
      )
      module.run(workspace)
      object_out = workspace.object_set.get_objects(OUTPUT_OBJECTS_NAME)
      assert numpy.all(object_out.segmented == 0)
      assert numpy.all(
          object_out.unedited_segmented == expected_unedited
      )
  
      object_out = workspace.object_set.get_objects(NEW_OBJECTS_NAME)
      assert numpy.all(object_out.segmented == 0)
      assert numpy.all(object_out.unedited_segmented == labels)
  
imports: import io
  import centrosome.threshold
  import numpy
  from cellprofiler_core.constants.measurement import FF_COUNT, COLTYPE_FLOAT, COLTYPE_INTEGER, R_FIRST_IMAGE_NUMBER, R_SECOND_IMAGE_NUMBER, R_FIRST_OBJECT_NUMBER, R_SECOND_OBJECT_NUMBER
  from cellprofiler_core.constants.module._identify import TS_GLOBAL, O_TWO_CLASS, O_FOREGROUND
  import tests.frontend.modules
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler.modules.identifysecondaryobjects
  import cellprofiler.modules.threshold
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.workspace
label_desc: Use image node_id 19 for calling a global function with example usage: test_filter_edge() without return types