code: def test_get_all_paths_two_segments():
      module = cellprofiler.modules.untangleworms.UntangleWorms()
  
      class Result(object):
          def __init__(self):
              self.branch_areas = [1]
              self.segments = [
                  [numpy.zeros((1, 2)), numpy.zeros((1, 2))]
              ] * 2
              self.incidence_matrix = numpy.ones((1, 2), bool)
              self.incidence_directions = numpy.array([[True, False]])
  
      path_list = list(module.get_all_paths(Result(), 0, 1000))
      assert len(path_list) == 3
      sorted_list = tuple(
          sorted(
              [
                  (tuple(path.segments), tuple(path.branch_areas))
                  for path in path_list
              ]
          )
      )
      expected = (((0,), ()), ((0, 1), (0,)), ((1,), ()))
      assert sorted_list == expected
  
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 22 for calling a global function with example usage: test_get_all_paths_two_segments() without return types