code: def testClipBboxes(self):
      image_shape = (50, 60)  # height, width
      boxes = np.array(
          [
              [-1, 10, 20, 20],  # x_min is left of the image.
              [10, -1, 20, 20],  # y_min is above the image.
              [10, 10, 60, 20],  # x_max is right of the image.
              [10, 10, 20, 50],  # y_max is below the image.
              [10, 10, 20, 20],  # everything is in place
              [60, 50, 60, 50],  # complete box is outside the image.
          ]
      )
      clipped_bboxes = self._clip_boxes(boxes, image_shape)
      self.assertAllEqual(
          clipped_bboxes,
          [
              [0, 10, 20, 20],
              [10, 0, 20, 20],
              [10, 10, 59, 20],
              [10, 10, 20, 49],
              [10, 10, 20, 20],
              [59, 49, 59, 49],
          ],
      )
  
file_path: luminoth/luminoth/utils/bbox_transform_test.py
imports: import numpy
  import tensorflow
  from luminoth.utils.bbox_transform import encode, decode, clip_boxes
  from luminoth.utils.bbox_transform_tf import encode, decode, clip_boxes
  from luminoth.utils.test.gt_boxes import generate_gt_boxes
label_desc: Use image node_id 7 for calling the BBoxTransformTest obj's underlying member method code with example usage: obj.testClipBboxes() without return types