code: def test_spspmm(dtype, device):
      if dtype in {torch.half, torch.bfloat16}:
          return  # Not yet implemented.
  
      src = torch.tensor(
          [[1, 0, 0], [0, 1, 0], [0, 0, 1]], dtype=dtype, device=device
      )
  
      src = SparseTensor.from_dense(src)
      out = matmul(src, src)
      assert out.sizes() == [3, 3]
      assert out.has_value()
      rowptr, col, value = out.csr()
      assert rowptr.tolist() == [0, 1, 2, 3]
      assert col.tolist() == [0, 1, 2]
      assert value.tolist() == [1, 1, 1]
  
      src.set_value_(None)
      out = matmul(src, src)
      assert out.sizes() == [3, 3]
      assert not out.has_value()
      rowptr, col, value = out.csr()
      assert rowptr.tolist() == [0, 1, 2, 3]
      assert col.tolist() == [0, 1, 2]
  
      torch.jit.script(spspmm)
  
file_path: pytorch_sparse/test/test_matmul.py
imports: from itertools import product
  import pytest
  import torch
  import torch_scatter
  from torch_sparse.matmul import matmul, spspmm
  from torch_sparse.tensor import SparseTensor
  from torch_sparse.testing import devices, grad_dtypes, reductions
label_desc: Use image node_id 2 for calling a global function with example usage: test_spspmm(dtype, device) without return types