code: def test_sparse_tensor_spspmm(dtype, device):
      if dtype in {torch.half, torch.bfloat16}:
          return  # Not yet implemented.
  
      x = SparseTensor(
          row=torch.tensor(
              [0, 1, 1, 1, 2, 3, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 9, 9],
              device=device,
          ),
          col=torch.tensor(
              [
                  0,
                  5,
                  10,
                  15,
                  1,
                  2,
                  3,
                  7,
                  13,
                  6,
                  9,
                  5,
                  10,
                  15,
                  11,
                  14,
                  5,
                  15,
              ],
              device=device,
          ),
          value=torch.tensor(
              [
                  1,
                  3**-0.5,
                  3**-0.5,
                  3**-0.5,
                  1,
                  1,
                  1,
                  -(2**-0.5),
                  -(2**-0.5),
                  -(2**-0.5),
                  -(2**-0.5),
                  6**-0.5,
                  -(6**0.5) / 3,
                  6**-0.5,
                  -(2**-0.5),
                  -(2**-0.5),
                  2**-0.5,
                  -(2**-0.5),
              ],
              dtype=dtype,
              device=device,
          ),
      )
  
      expected = torch.eye(10, device=device).to(dtype)
  
      out = x @ x.to_dense().t()
      assert torch.allclose(out, expected, atol=1e-2)
  
      out = x @ x.t()
      out = out.to_dense()
      assert torch.allclose(out, expected, atol=1e-2)
  
imports: from itertools import product
  import pytest
  import torch
  from torch_sparse import SparseTensor, spspmm
  from torch_sparse.testing import devices, grad_dtypes, tensor
label_desc: Use image node_id 2 for calling a global function with example usage: test_sparse_tensor_spspmm(dtype, device) without return types