code: def test_apply_rotated_boxes(self):
      np.random.seed(125)
      cfg = get_cfg()
      is_train = True
      augs = detection_utils.build_augmentation(cfg, is_train)
      image = np.random.rand(200, 300)
      image, transforms = T.apply_augmentations(augs, image)
      image_shape = image.shape[:2]  # h, w
      assert image_shape == (800, 1200)
      annotation = {"bbox": [179, 97, 62, 40, -56]}
  
      boxes = np.array(
          [annotation["bbox"]], dtype=np.float64
      )  # boxes.shape = (1, 5)
      transformed_bbox = transforms.apply_rotated_box(boxes)[0]
  
      expected_bbox = np.array(
          [484, 388, 248, 160, 56], dtype=np.float64
      )
      err_msg = "transformed_bbox = {}, expected {}".format(
          transformed_bbox, expected_bbox
      )
      assert np.allclose(transformed_bbox, expected_bbox), err_msg
  
imports: import logging
  import numpy
  import unittest
  from unittest import mock
  import torch
  from PIL import Image, ImageOps
  from torch.nn import functional
  from detectron2.config import get_cfg
  from detectron2.data import detection_utils
  from detectron2.data import transforms
  from detectron2.utils.logger import setup_logger
label_desc: Use image node_id 2 for calling the TestTransforms obj's underlying member method code with example usage: obj.test_apply_rotated_boxes() without return types