code: def test_flip_left_to_right():
      numpy.random.seed(0)
      image = numpy.random.uniform(size=(3, 3))
      mask = numpy.array(
          [[True, True, True], [False, True, True], [True, False, True]]
      )
      expected_mask = numpy.array(
          [[True, True, True], [True, True, False], [True, False, True]]
      )
      expected = image.copy()
      expected[:, 2] = image[:, 0]
      expected[:, 0] = image[:, 2]
  
      def fn(module):
          assert isinstance(
              module, cellprofiler.modules.flipandrotate.FlipAndRotate
          )
          module.flip_choice.value = (
              cellprofiler.modules.flipandrotate.FLIP_LEFT_TO_RIGHT
          )
          module.rotate_choice.value = (
              cellprofiler.modules.flipandrotate.ROTATE_NONE
          )
  
      output_image, angle = run_module(image, mask=mask, fn=fn)
      assert angle == 0
      assert numpy.all(output_image.mask == expected_mask)
      assert numpy.all(
          numpy.abs(output_image.pixel_data - expected)
          <= numpy.finfo(numpy.float32).eps
      )
  
file_path: CellProfiler/tests/frontend/modules/test_flipandrotate.py
imports: import centrosome.cpmorphology
  import numpy
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  import cellprofiler.modules.flipandrotate
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
label_desc: Use image node_id 2 for calling a global function with example usage: test_flip_left_to_right() without return types