code: def test_trace_short_segment():
      """Trace a segment of a single point"""
      module = cellprofiler.modules.untangleworms.UntangleWorms()
      image = numpy.zeros((10, 20), bool)
      for i in range(1, 3):
          image[5, 10 : (10 + i)] = True
          expected_order = numpy.zeros(image.shape, int)
          expected_order[image] = numpy.arange(numpy.sum(image))
          i, j, label, order, distance, count = module.trace_segments(
              image
          )
          assert count == 1
          assert numpy.all(label == 1)
          for x in (i, j, order, distance):
              assert len(x) == numpy.sum(image)
  
          result_order = numpy.zeros(image.shape, int)
          result_order[i, j] = order
          assert numpy.all(image[i, j])
          assert numpy.all(expected_order == result_order)
  
imports: import base64
  import io
  import os
  import tempfile
  import zlib
  import imageio
  import centrosome.outline
  import numpy
  import scipy.ndimage
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.modules
  import cellprofiler.modules.untangleworms
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.setting
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 9 for calling a global function with example usage: test_trace_short_segment() without return types