code: def test_pairwise_iou_45_degrees(self):
      for device in ["cpu"] + (
          ["cuda"] if torch.cuda.is_available() else []
      ):
          boxes1 = torch.tensor(
              [
                  [1, 1, math.sqrt(2), math.sqrt(2), 45],
                  [1, 1, 2 * math.sqrt(2), 2 * math.sqrt(2), -45],
              ],
              dtype=torch.float32,
              device=device,
          )
          boxes2 = torch.tensor(
              [[1, 1, 2, 2, 0]], dtype=torch.float32, device=device
          )
          expected_ious = torch.tensor(
              [[0.5], [0.5]], dtype=torch.float32, device=device
          )
          ious = pairwise_iou(
              RotatedBoxes(boxes1), RotatedBoxes(boxes2)
          )
          self.assertTrue(torch.allclose(ious, expected_ious))
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import math
  import random
  import unittest
  import torch
  from fvcore.common.benchmark import benchmark
  from detectron2.layers.rotated_boxes import pairwise_iou_rotated
  from detectron2.structures.boxes import Boxes
  from detectron2.structures.rotated_boxes import RotatedBoxes, pairwise_iou
  from detectron2.utils.testing import reload_script_model
label_desc: Use image node_id 5 for calling the TestRotatedBoxesStructure obj's underlying member method code with example usage: obj.test_pairwise_iou_45_degrees() without return types