code: def test_overlay_rotated_instances(self):
      H, W = 100, 150
      img = np.random.rand(H, W, 3) * 255
      num_boxes = 50
      boxes_5d = torch.zeros(num_boxes, 5)
      boxes_5d[:, 0] = torch.FloatTensor(num_boxes).uniform_(
          -0.1 * W, 1.1 * W
      )
      boxes_5d[:, 1] = torch.FloatTensor(num_boxes).uniform_(
          -0.1 * H, 1.1 * H
      )
      boxes_5d[:, 2] = torch.FloatTensor(num_boxes).uniform_(
          0, max(W, H)
      )
      boxes_5d[:, 3] = torch.FloatTensor(num_boxes).uniform_(
          0, max(W, H)
      )
      boxes_5d[:, 4] = torch.FloatTensor(num_boxes).uniform_(
          -1800, 1800
      )
      rotated_boxes = RotatedBoxes(boxes_5d)
      labels = [str(i) for i in range(num_boxes)]
  
      v = Visualizer(img, self.metadata)
      output = v.overlay_instances(
          boxes=rotated_boxes, labels=labels
      ).get_image()
      self.assertEqual(output.shape, img.shape)
  
imports: import numpy
  import os
  import tempfile
  import unittest
  import cv2
  import torch
  from detectron2.data import MetadataCatalog
  from detectron2.structures import BoxMode, Instances, RotatedBoxes
  from detectron2.utils.visualizer import ColorMode, Visualizer
label_desc: Use image node_id 11 for calling the TestVisualizer obj's underlying member method code with example usage: obj.test_overlay_rotated_instances() without return types