code: def test_two_objects_propagation_distance():
      p = cellprofiler_core.pipeline.Pipeline()
      o_s = cellprofiler_core.object.ObjectSet()
      i_l = cellprofiler_core.image.ImageSetList()
      img = numpy.zeros((10, 20))
      img[2:7, 2:7] = 0.3
      img[2:7, 7:17] = 0.5
      image = cellprofiler_core.image.Image(img)
      objects = cellprofiler_core.object.Objects()
      labels = numpy.zeros((10, 20), int)
      labels[3:6, 3:6] = 1
      labels[3:6, 13:16] = 2
      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.regularization_factor.value = 1000  # propagate by distance
      module.threshold.threshold_scope.value = (
          cellprofiler.modules.threshold.TS_GLOBAL
      )
      module.threshold.global_operation.value = (
          cellprofiler.modules.threshold.TM_MANUAL
      )
      module.threshold.manual_threshold.value = 0.2
      module.set_module_num(1)
      p.add_module(module)
      workspace = cellprofiler_core.workspace.Workspace(
          p, module, i_s, o_s, m, i_l
      )
      module.run(workspace)
      assert OUTPUT_OBJECTS_NAME in m.get_object_names()
      assert "Image" in m.get_object_names()
      assert "Count_%s" % OUTPUT_OBJECTS_NAME in m.get_feature_names(
          "Image"
      )
      counts = m.get_current_measurement(
          "Image", "Count_%s" % OUTPUT_OBJECTS_NAME
      )
      assert numpy.product(counts.shape) == 1
      assert counts == 2
      objects_out = o_s.get_objects(OUTPUT_OBJECTS_NAME)
      expected = numpy.zeros((10, 20), int)
      expected[2:7, 2:10] = 1
      expected[2:7, 10:17] = 2
      mask = numpy.ones((10, 20), bool)
      mask[:, 9:11] = False
      assert numpy.all(objects_out.segmented[mask] == expected[mask])
  
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 7 for calling a global function with example usage: test_two_objects_propagation_distance() without return types