def METHOD_NAME(self, img, box, resolution):
    """
    RoiAlignRotated with scale 1.0 and 0 sample ratio.
    """
    op = ROIAlignRotated(output_size=resolution, spatial_scale=1.0, sampling_ratio=0)
    input = img[None, None, :, :]
    rois = [0] + list(box)
    rois = torch.tensor(rois, dtype=torch.float32)[None, :]
    result_cpu = op.forward(input, rois)
    if torch.cuda.is_available():
        result_cuda = op.forward(input.cuda(), rois.cuda())
        assert torch.allclose(result_cpu, result_cuda.cpu())
    return result_cpu[0, 0]