code: def test_rotate_use_box_type(self):
      # test case when no rotate aug (level=0)
      transform = Rotate(
          prob=1.0,
          level=0,
          img_border_value=self.img_border_value,
          seg_ignore_label=self.seg_ignore_label,
      )
      results_wo_rotate = transform(
          copy.deepcopy(self.results_mask_boxtype)
      )
      check_result_same(
          self.results_mask_boxtype, results_wo_rotate, self.check_keys
      )
  
      # test clockwise rotation with angle 90
      transform = Rotate(
          prob=1.0,
          level=10,
          max_mag=90.0,
          # set reversal_prob to 1 for clockwise rotation
          reversal_prob=1.0,
      )
      results_rotated = transform(
          copy.deepcopy(self.results_mask_boxtype)
      )
      # The image, masks, and semantic segmentation map
      # will be bilinearly interpolated.
      img_gt = np.array(
          [[69, 8, 4, 65], [69, 9, 5, 65], [70, 10, 6, 66]]
      ).astype(np.uint8)
      img_gt = np.stack([img_gt, img_gt, img_gt], axis=-1)
      results_gt = copy.deepcopy(self.results_mask_boxtype)
      results_gt["img"] = img_gt
      results_gt["gt_bboxes"] = HorizontalBoxes(
          np.array([[0.5, 0.5, 2.5, 1.5]], dtype=np.float32)
      )
      gt_masks = np.array(
          [[0, 1, 1, 0], [0, 1, 1, 0], [0, 0, 0, 0]], dtype=np.uint8
      )[None, :, :]
      results_gt["gt_masks"] = BitmapMasks(gt_masks, 3, 4)
      results_gt["gt_ignore_flags"] = np.array(
          np.array([1], dtype=bool)
      )
      results_gt["gt_seg_map"] = np.array(
          [[255, 13, 13, 13], [255, 255, 13, 255], [255, 255, 255, 255]]
      ).astype(self.results_mask["gt_seg_map"].dtype)
      check_result_same(results_gt, results_rotated, self.check_keys)
  
      # test counter-clockwise rotation with angle 90
      transform = Rotate(
          prob=1.0,
          level=10,
          max_mag=90.0,
          # set reversal_prob to 0 for counter-clockwise rotation
          reversal_prob=0.0,
      )
      results_rotated = transform(
          copy.deepcopy(self.results_mask_boxtype)
      )
      # The image, masks, and  semantic segmentation map
      # will be bilinearly interpolated.
      img_gt = np.array(
          [[66, 6, 10, 70], [65, 5, 9, 69], [65, 4, 8, 69]]
      ).astype(np.uint8)
      img_gt = np.stack([img_gt, img_gt, img_gt], axis=-1)
      results_gt = copy.deepcopy(self.results_mask_boxtype)
      results_gt["img"] = img_gt
      results_gt["gt_bboxes"] = HorizontalBoxes(
          np.array([[0.5, 0.5, 2.5, 1.5]], dtype=np.float32)
      )
      gt_masks = np.array(
          [[0, 0, 0, 0], [0, 1, 1, 0], [0, 1, 1, 0]], dtype=np.uint8
      )[None, :, :]
      results_gt["gt_masks"] = BitmapMasks(gt_masks, 3, 4)
      results_gt["gt_ignore_flags"] = np.array(
          np.array([1], dtype=bool)
      )
      results_gt["gt_seg_map"] = np.array(
          [[255, 255, 255, 255], [255, 13, 255, 255], [13, 13, 13, 255]]
      ).astype(self.results_mask["gt_seg_map"].dtype)
      check_result_same(results_gt, results_rotated, self.check_keys)
  
imports: import copy
  import unittest
  import numpy
  from mmdet.datasets.transforms import GeomTransform, Rotate, ShearX, ShearY, TranslateX, TranslateY
  from mmdet.structures.bbox import HorizontalBoxes
  from mmdet.structures.mask import BitmapMasks, PolygonMasks
  from .utils import check_result_same, construct_toy_data
label_desc: Use image node_id 3 for calling the TestRotate obj's underlying member method code with example usage: obj.test_rotate_use_box_type() without return types