code: def test_diag(self, device, dtype):
      sample = torch.tensor(
          [
              [
                  [
                      [0.0, 0.0, 0.0, 0, 0],
                      [0.0, 0.0, 0.0, 0, 0.0],
                      [0.0, 0, 0.0, 0, 0.0],
                      [0.0, 0.0, 0, 0, 0.0],
                      [0.0, 0.0, 0.0, 0, 0.0],
                  ],
                  [
                      [0.0, 0.0, 0.0, 0, 0],
                      [0.0, 0.0, 1, 0, 0.0],
                      [0.0, 1, 1.2, 1.1, 0.0],
                      [0.0, 0.0, 1.0, 0, 0.0],
                      [0.0, 0.0, 0.0, 0, 0.0],
                  ],
                  [
                      [0.0, 0.0, 0.0, 0, 0],
                      [0.0, 0.0, 0.0, 0, 0.0],
                      [0.0, 0, 0.0, 0, 0.0],
                      [0.0, 0.0, 0, 0, 0.0],
                      [0.0, 0.0, 0.0, 0, 0.0],
                  ],
              ]
          ],
          device=device,
          dtype=dtype,
      )
      sample = kornia.filters.gaussian_blur2d(
          sample, (5, 5), (0.5, 0.5)
      ).unsqueeze(0)
      softargmax = kornia.geometry.ConvQuadInterp3d(10)
      expected_val = torch.tensor(
          [
              [
                  [
                      [
                          [0.0, 0.0, 0.0, 0, 0],
                          [0.0, 0.0, 0.0, 0, 0.0],
                          [0.0, 0, 0.0, 0, 0.0],
                          [0.0, 0.0, 0, 0, 0.0],
                          [0.0, 0.0, 0.0, 0, 0.0],
                      ],
                      [
                          [
                              2.2504e-04,
                              2.3146e-02,
                              1.6808e-01,
                              2.3188e-02,
                              2.3628e-04,
                          ],
                          [
                              2.3146e-02,
                              1.8118e-01,
                              7.4338e-01,
                              1.8955e-01,
                              2.5413e-02,
                          ],
                          [
                              1.6807e-01,
                              7.4227e-01,
                              1.1086e01,
                              8.0414e-01,
                              1.8482e-01,
                          ],
                          [
                              2.3146e-02,
                              1.8118e-01,
                              7.4338e-01,
                              1.8955e-01,
                              2.5413e-02,
                          ],
                          [
                              2.2504e-04,
                              2.3146e-02,
                              1.6808e-01,
                              2.3188e-02,
                              2.3628e-04,
                          ],
                      ],
                      [
                          [0.0, 0.0, 0.0, 0, 0],
                          [0.0, 0.0, 0.0, 0, 0.0],
                          [0.0, 0, 0.0, 0, 0.0],
                          [0.0, 0.0, 0, 0, 0.0],
                          [0.0, 0.0, 0.0, 0, 0.0],
                      ],
                  ]
              ]
          ],
          device=device,
          dtype=dtype,
      )
      expected_coord = torch.tensor(
          [
              [
                  [
                      [
                          [
                              [0.0, 0.0, 0.0, 0.0, 0.0],
                              [0.0, 0.0, 0.0, 0.0, 0.0],
                              [0.0, 0.0, 0.0, 0.0, 0.0],
                              [0.0, 0.0, 0.0, 0.0, 0.0],
                              [0.0, 0.0, 0.0, 0.0, 0.0],
                          ],
                          [
                              [1.0, 1.0, 1.0, 1.0, 1.0],
                              [1.0, 1.0, 1.0, 1.0, 1.0],
                              [1.0, 1.0, 1.0, 1.0, 1.0],
                              [1.0, 1.0, 1.0, 1.0, 1.0],
                              [1.0, 1.0, 1.0, 1.0, 1.0],
                          ],
                          [
                              [2.0, 2.0, 2.0, 2.0, 2.0],
                              [2.0, 2.0, 2.0, 2.0, 2.0],
                              [2.0, 2.0, 2.0, 2.0, 2.0],
                              [2.0, 2.0, 2.0, 2.0, 2.0],
                              [2.0, 2.0, 2.0, 2.0, 2.0],
                          ],
                      ],
                      [
                          [
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                          ],
                          [
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                              [0.0, 1.0, 2.0495, 3.0, 4.0],
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                          ],
                          [
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                              [0.0, 1.0, 2.0, 3.0, 4.0],
                          ],
                      ],
                      [
                          [
                              [0.0, 0.0, 0.0, 0.0, 0.0],
                              [1.0, 1.0, 1.0, 1.0, 1.0],
                              [2.0, 2.0, 2.0, 2.0, 2.0],
                              [3.0, 3.0, 3.0, 3.0, 3.0],
                              [4.0, 4.0, 4.0, 4.0, 4.0],
                          ],
                          [
                              [0.0, 0.0, 0.0, 0.0, 0.0],
                              [1.0, 1.0, 1.0, 1.0, 1.0],
                              [2.0, 2.0, 2.0, 2.0, 2.0],
                              [3.0, 3.0, 3.0, 3.0, 3.0],
                              [4.0, 4.0, 4.0, 4.0, 4.0],
                          ],
                          [
                              [0.0, 0.0, 0.0, 0.0, 0.0],
                              [1.0, 1.0, 1.0, 1.0, 1.0],
                              [2.0, 2.0, 2.0, 2.0, 2.0],
                              [3.0, 3.0, 3.0, 3.0, 3.0],
                              [4.0, 4.0, 4.0, 4.0, 4.0],
                          ],
                      ],
                  ]
              ]
          ],
          device=device,
          dtype=dtype,
      )
      coords, val = softargmax(sample)
      assert_close(val, expected_val, atol=1e-4, rtol=1e-4)
      assert_close(coords, expected_coord, atol=1e-4, rtol=1e-4)
  
imports: import torch
  from torch.autograd import gradcheck
  from torch.nn.functional import mse_loss
  import kornia
  import kornia.testing
  from kornia.geometry.subpix.spatial_soft_argmax import _get_center_kernel2d, _get_center_kernel3d
  from kornia.testing import assert_close
label_desc: Use image node_id 3 for calling the TestConvQuadInterp3d obj's underlying member method code with example usage: obj.test_diag(device, dtype) without return types