code: def test_flip_both():
      numpy.random.seed(0)
      image = numpy.random.uniform(size=(3, 3)).astype(numpy.float32)
      mask = numpy.array(
          [[True, True, True], [False, True, True], [True, False, True]]
      )
      expected_mask = numpy.array(
          [[True, False, True], [True, True, False], [True, True, True]]
      )
      expected = image[
          numpy.array([[2, 2, 2], [1, 1, 1], [0, 0, 0]]),
          numpy.array([[2, 1, 0], [2, 1, 0], [2, 1, 0]]),
      ]
  
      def fn(module):
          assert isinstance(
              module, cellprofiler.modules.flipandrotate.FlipAndRotate
          )
          module.flip_choice.value = (
              cellprofiler.modules.flipandrotate.FLIP_BOTH
          )
          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(float).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 4 for calling a global function with example usage: test_flip_both() without return types