def METHOD_NAME(self):
    data = get_coco_sample(img_shape=(512, 512), num_instances=1)
    codec = SPR(
        input_size=(512, 512),
        heatmap_size=(128, 128),
        sigma=(4, ),
        generate_keypoint_heatmaps=False,
    )
    encoded = codec.encode(data['keypoints'], data['keypoints_visible'])
    decoded = codec.decode(
        to_tensor(encoded['heatmaps']),
        to_tensor(encoded['displacements']))
    keypoints, _ = decoded
    self.assertTrue(
        np.allclose(to_numpy(keypoints), data['keypoints'], atol=5.))