code: def test_flip_dont_flip_top():
      r = numpy.random.RandomState()
      r.seed(0)
      image = r.uniform(size=(60, 30))
      image[25:] /= 5.0
      control_points = numpy.array(
          [
              [[21], [15]],
              [[23], [15]],
              [[25], [15]],
              [[27], [15]],
              [[29], [15]],
          ]
      )
      lengths = numpy.array([8])
      radii = numpy.array([1, 3, 5, 3, 1])
      workspace, module = make_workspace(
          control_points, lengths, radii, image
      )
      assert isinstance(
          module, cellprofiler.modules.straightenworms.StraightenWorms
      )
      module.width.value = 11
      module.wants_measurements.value = True
      module.number_of_segments.value = 3
      module.flip_worms.value = (
          cellprofiler.modules.straightenworms.FLIP_TOP
      )
      module.run(workspace)
      image_set = workspace.image_set
      assert isinstance(image_set, cellprofiler_core.image.ImageSet)
      pixels = image_set.get_image(STRAIGHTENED_IMAGE_NAME).pixel_data
      assert pixels.shape[1] == 11
      assert pixels.shape[0] == 19
      numpy.testing.assert_almost_equal(pixels, image[16:35, 10:21])
  
imports: import centrosome.cpmorphology
  import numpy
  import six.moves
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.modules
  from cellprofiler_core.constants.measurement import C_COUNT, M_LOCATION_CENTER_X, M_LOCATION_CENTER_Y, M_NUMBER_OBJECT_NUMBER, C_LOCATION, C_NUMBER, FTR_CENTER_X, FTR_CENTER_Y, FTR_OBJECT_NUMBER, COLTYPE_FLOAT
  import cellprofiler.modules.straightenworms
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.setting
  import cellprofiler_core.workspace
  import cellprofiler_core.preferences
  import tests.frontend.modules
label_desc: Use image node_id 18 for calling a global function with example usage: test_flip_dont_flip_top() without return types