code: def sp_sub(A: SparseMatrix, B: SparseMatrix) -> SparseMatrix:
      """Elementwise subtraction
  
      Parameters
      ----------
      A : SparseMatrix
          Sparse matrix
      B : SparseMatrix
          Sparse matrix
  
      Returns
      -------
      SparseMatrix
          Sparse matrix
  
      Examples
      --------
  
      >>> indices = torch.tensor([[1, 0, 2], [0, 3, 2]])
      >>> val = torch.tensor([10, 20, 30])
      >>> val2 = torch.tensor([5, 10, 15])
      >>> A = dglsp.spmatrix(indices, val, shape=(3, 4))
      >>> B = dglsp.spmatrix(indices, val2, shape=(3, 4))
      >>> A - B
      SparseMatrix(indices=tensor([[0, 1, 2],
                                   [3, 0, 2]]),
                   values=tensor([10, 5, 15]),
                   shape=(3, 4), nnz=3)
      """
      # Python falls back to B.__rsub__ then TypeError when NotImplemented is
      # returned.
      return (
          spsp_add(A, -B)
          if isinstance(B, SparseMatrix)
          else NotImplemented
      )
  
file_path: dgl/python/dgl/sparse/elementwise_op_sp.py
imports: from typing import Union
  import torch
  from .sparse_matrix import SparseMatrix, val_like
  from .utils import is_scalar, Scalar
label_desc: Use image node_id 5 for calling a global function with example usage: sp_sub(A, B) and returns: unknown