def METHOD_NAME(self):
    dtype = torch.float64
    device = torch.device("cpu")
    roi_align_rotated_op = ROIAlignRotated(
        output_size=(5, 5), spatial_scale=0.5, sampling_ratio=1
    ).to(dtype=dtype, device=device)
    x = torch.rand(1, 1, 10, 10, dtype=dtype, device=device, requires_grad=True)
    # roi format is (batch index, x_center, y_center, width, height, angle)
    rois = torch.tensor(
        [[0, 4.5, 4.5, 9, 9, 0], [0, 2, 7, 4, 4, 0], [0, 7, 7, 4, 4, 0]],
        dtype=dtype,
        device=device,
    )
    def func(input):
        return roi_align_rotated_op(input, rois)
    assert gradcheck(func, (x,)), "gradcheck failed for RoIAlignRotated CPU"
    assert gradcheck(func, (x.transpose(2, 3),)), "gradcheck failed for RoIAlignRotated CPU"