code: def test_spspmul(
      create_func1, create_func2, shape, nnz1, nnz2, nz_dim
  ):
      dev = F.ctx()
      A = create_func1(shape, nnz1, dev, nz_dim)
      B = create_func2(shape, nnz2, dev, nz_dim)
      C = mul(A, B)
      assert not C.has_duplicate()
  
      DA = sparse_matrix_to_dense(A)
      DB = sparse_matrix_to_dense(B)
      DC = DA * DB
  
      grad = torch.rand_like(C.val)
      C.val.backward(grad)
      DC_grad = sparse_matrix_to_dense(val_like(C, grad))
      DC.backward(DC_grad)
  
      assert torch.allclose(sparse_matrix_to_dense(C), DC, atol=1e-05)
      assert torch.allclose(
          val_like(A, A.val.grad).to_dense(), DA.grad, atol=1e-05
      )
      assert torch.allclose(
          val_like(B, B.val.grad).to_dense(), DB.grad, atol=1e-05
      )
  
file_path: dgl/tests/python/pytorch/sparse/test_elementwise_op_sp.py
imports: import sys
  import backend
  import pytest
  import torch
  from dgl.sparse import div, from_coo, mul, power, spmatrix, val_like
  from .utils import rand_coo, rand_csc, rand_csr, rand_diag, sparse_matrix_to_dense
label_desc: Use image node_id 5 for calling a global function with example usage: test_spspmul(create_func1, create_func2, shape, nnz1, nnz2, nz_dim) without return types