def METHOD_NAME(self):
    data = get_coco_sample(img_shape=(512, 512), num_instances=1)
    # decode w/o keypoint heatmaps
    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, (root_scores, keypoint_scores) = decoded
    self.assertIsNone(keypoint_scores)
    self.assertEqual(keypoints.shape, data['keypoints'].shape)
    self.assertEqual(root_scores.shape, data['keypoints'].shape[:1])
    # decode w/ keypoint heatmaps
    codec = SPR(
        input_size=(512, 512),
        heatmap_size=(128, 128),
        sigma=(4, 2),
        generate_keypoint_heatmaps=True,
    )
    encoded = codec.encode(data['keypoints'], data['keypoints_visible'])
    decoded = codec.decode(
        to_tensor(encoded['heatmaps']),
        to_tensor(encoded['displacements']))
    keypoints, (root_scores, keypoint_scores) = decoded
    self.assertIsNotNone(keypoint_scores)
    self.assertEqual(keypoints.shape, data['keypoints'].shape)
    self.assertEqual(root_scores.shape, data['keypoints'].shape[:1])
    self.assertEqual(keypoint_scores.shape, data['keypoints'].shape[:2])