def METHOD_NAME(self):
    cfg = get_cfg()
    cfg.MODEL.ANCHOR_GENERATOR.SIZES = [[32, 64]]
    cfg.MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS = [[0.25, 1, 4]]
    cfg.MODEL.ANCHOR_GENERATOR.ANGLES = [0, 45]  # test single list[float]
    anchor_generator = RotatedAnchorGenerator(cfg, [ShapeSpec(stride=4)])
    # only the last two dimensions of features matter here
    num_images = 2
    features = {"stage3": torch.rand(num_images, 96, 1, 2)}
    anchors = anchor_generator([features["stage3"]])
    expected_anchor_tensor = torch.tensor(
        [
            [0.0, 0.0, 64.0, 16.0, 0.0],
            [0.0, 0.0, 64.0, 16.0, 45.0],
            [0.0, 0.0, 32.0, 32.0, 0.0],
            [0.0, 0.0, 32.0, 32.0, 45.0],
            [0.0, 0.0, 16.0, 64.0, 0.0],
            [0.0, 0.0, 16.0, 64.0, 45.0],
            [0.0, 0.0, 128.0, 32.0, 0.0],
            [0.0, 0.0, 128.0, 32.0, 45.0],
            [0.0, 0.0, 64.0, 64.0, 0.0],
            [0.0, 0.0, 64.0, 64.0, 45.0],
            [0.0, 0.0, 32.0, 128.0, 0.0],
            [0.0, 0.0, 32.0, 128.0, 45.0],
            [4.0, 0.0, 64.0, 16.0, 0.0],  # 4.0 == 0.0 + STRIDE (4)
            [4.0, 0.0, 64.0, 16.0, 45.0],
            [4.0, 0.0, 32.0, 32.0, 0.0],
            [4.0, 0.0, 32.0, 32.0, 45.0],
            [4.0, 0.0, 16.0, 64.0, 0.0],
            [4.0, 0.0, 16.0, 64.0, 45.0],
            [4.0, 0.0, 128.0, 32.0, 0.0],
            [4.0, 0.0, 128.0, 32.0, 45.0],
            [4.0, 0.0, 64.0, 64.0, 0.0],
            [4.0, 0.0, 64.0, 64.0, 45.0],
            [4.0, 0.0, 32.0, 128.0, 0.0],
            [4.0, 0.0, 32.0, 128.0, 45.0],
        ]
    )
    self.assertTrue(torch.allclose(anchors[0].tensor, expected_anchor_tensor))