code: def test_edges_norm(self, device, dtype):
      inp = torch.tensor(
          [
              [
                  [
                      [0.0, 0.0, 0.0, 0.0, 0.0],
                      [0.0, 0.0, 1.0, 0.0, 0.0],
                      [0.0, 1.0, 1.0, 1.0, 0.0],
                      [0.0, 0.0, 1.0, 0.0, 0.0],
                      [0.0, 0.0, 0.0, 0.0, 0.0],
                  ]
              ]
          ],
          device=device,
          dtype=dtype,
      )
  
      expected = (
          torch.tensor(
              [
                  [
                      [
                          [
                              [0.0, 1.0, 0.0, -1.0, 0.0],
                              [1.0, 3.0, 0.0, -3.0, -1.0],
                              [2.0, 4.0, 0.0, -4.0, -2.0],
                              [1.0, 3.0, 0.0, -3.0, -1.0],
                              [0.0, 1.0, 0.0, -1.0, 0.0],
                          ],
                          [
                              [0.0, 1.0, 2.0, 1.0, 0.0],
                              [1.0, 3.0, 4.0, 3.0, 1.0],
                              [0.0, 0.0, 0.0, 0.0, 0],
                              [-1.0, -3.0, -4.0, -3.0, -1],
                              [0.0, -1.0, -2.0, -1.0, 0.0],
                          ],
                      ]
                  ]
              ],
              device=device,
              dtype=dtype,
          )
          / 8.0
      )
  
      edges = spatial_gradient(inp, normalized=True)
      self.assert_close(edges, expected)
  
imports: import pytest
  import torch
  from kornia.filters import Sobel, SpatialGradient, SpatialGradient3d, sobel, spatial_gradient, spatial_gradient3d
  from kornia.testing import BaseTester, tensor_to_gradcheck_var
label_desc: Use image node_id 5 for calling the TestSpatialGradient obj's underlying member method code with example usage: obj.test_edges_norm(device, dtype) without return types