code: def testFlipImageBoxes(self):
      image, boxes = self._get_image_with_boxes((500, 500, 3), 10)
      not_flipped_image, not_flipped_boxes = self._flip_image(
          image, boxes
      )
      self.assertAllClose(not_flipped_image, image)
      self.assertAllClose(not_flipped_boxes, boxes)
  
      # Test box same size as image, left_right flip should not change.
      image = self._gen_image(100, 100, 3)
      boxes = np.array([[0, 0, 99, 99, -1]])
      flipped_image, flipped_boxes = self._flip_image(
          image, boxes, left_right=True
      )
      self.assertAllClose(boxes, flipped_boxes)
      # Check that sum of columns is not modified, just the order.
      self.assertAllClose(image.sum(axis=1), flipped_image.sum(axis=1))
  
      # Test box same size as image, up_down flip, should not change.
      image = self._gen_image(100, 100, 3)
      boxes = np.array([[0, 0, 99, 99, -1]])
      flipped_image, flipped_boxes = self._flip_image(
          image, boxes, up_down=True
      )
      self.assertAllClose(boxes, flipped_boxes)
      # Check that sum of columns is not modified, just the order.
      self.assertAllClose(image.sum(axis=0), flipped_image.sum(axis=0))
  
      # Test box same size as image, up_down flip, should not change.
      image = self._gen_image(100, 100, 3)
      boxes = np.array([[0, 0, 99, 99, -1]])
      flipped_image, flipped_boxes = self._flip_image(
          image, boxes, up_down=True, left_right=True
      )
      # Check that sum of columns is not modified, just the order.
      self.assertAllClose(boxes, flipped_boxes)
  
      # Test box same size as image, up_down flip, should not change.
      image = self._gen_image(100, 100, 3)
      boxes = np.array([[0, 0, 10, 10, -1]])
      flipped_image, flipped_boxes = self._flip_image(
          image, boxes, up_down=True, left_right=True
      )
      # Check that sum of columns is not modified, just the order.
      self.assertAllClose(
          np.array([[89.0, 89.0, 99.0, 99.0, -1.0]]), flipped_boxes
      )
  
imports: import numpy
  import tensorflow
  from easydict import EasyDict
  from luminoth.utils.image import resize_image, flip_image, random_patch, random_resize, random_distortion, patch_image
  from luminoth.utils.test.gt_boxes import generate_gt_boxes
label_desc: Use image node_id 13 for calling the ImageTest obj's underlying member method code with example usage: obj.testFlipImageBoxes() without return types