code: def test_crossing_worms():
      """Find two worms that cross"""
      image = numpy.zeros((20, 20), bool)
      index, count, i, j = centrosome.cpmorphology.get_line_pts(
          numpy.array([1, 4, 19, 16]),
          numpy.array([3, 0, 15, 18]),
          numpy.array([4, 19, 16, 1]),
          numpy.array([0, 15, 18, 3]),
      )
      image[i, j] = True
      index, count, i, j = centrosome.cpmorphology.get_line_pts(
          numpy.array([0, 3, 18, 15]),
          numpy.array([16, 19, 4, 1]),
          numpy.array([3, 18, 15, 0]),
          numpy.array([19, 4, 1, 16]),
      )
      image[i, j] = True
      image = scipy.ndimage.binary_fill_holes(image)
      workspace, module = make_workspace(image)
      module.worm_length.value = 17
      module.worm_width.value = 5
      module.angle_count.value = 16
      module.run(workspace)
      m = workspace.measurements
      assert isinstance(m, cellprofiler_core.measurement.Measurements)
      count = m.get_current_image_measurement(
          "_".join((C_COUNT, OBJECTS_NAME))
      )
      assert count == 2
      a = m.get_current_measurement(
          OBJECTS_NAME, cellprofiler.modules.identifydeadworms.M_ANGLE
      )
      assert len(a) == 2
      if a[0] > 90:
          order = numpy.array([0, 1])
      else:
          order = numpy.array([1, 0])
      assert round(abs(a[order[0]] - 135), 0) == 0
      assert round(abs(a[order[1]] - 45), 0) == 0
      x = m.get_current_measurement(OBJECTS_NAME, M_LOCATION_CENTER_X)
      assert len(x) == 2
      assert round(abs(x[order[0]] - 9.0), 0) == 0
      assert round(abs(x[order[1]] - 10.0), 0) == 0
      y = m.get_current_measurement(OBJECTS_NAME, M_LOCATION_CENTER_Y)
      assert len(y) == 2
      assert round(abs(y[order[0]] - 10.0), 0) == 0
      assert round(abs(y[order[1]] - 9.0), 0) == 0
  
imports: import centrosome.cpmorphology
  import numpy
  import scipy.ndimage
  import six.moves
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import C_COUNT, M_LOCATION_CENTER_X, M_LOCATION_CENTER_Y, COLTYPE_INTEGER, COLTYPE_FLOAT, M_NUMBER_OBJECT_NUMBER, FF_COUNT
  import cellprofiler.modules.identifydeadworms
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
label_desc: Use image node_id 6 for calling a global function with example usage: test_crossing_worms() without return types