code: def test_sparse_subtract():
      s1 = SparseNDArray(s1_data)
      s2 = SparseNDArray(s2_data)
  
      assert_array_equal(s1 - s2, s1 - s2)
      assert_array_equal(s1 - d1, s1 - d1)
      assert_array_equal(d1 - s1, d1 - s1)
      r = sps.csr_matrix(
          ((s1.data - 1), s1.indices, s1.indptr), s1.shape
      )
      assert_array_equal(s1 - 1, r)
      r = sps.csr_matrix(
          ((1 - s1.data), s1.indices, s1.indptr), s1.shape
      )
      assert_array_equal(1 - s1, r)
  
      # test sparse vector
      v = SparseNDArray(v1, shape=(3,))
      assert_array_equal(v - v, v1_data - v1_data)
      assert_array_equal(v - d1, v1_data - d1)
      assert_array_equal(d1 - v, d1 - v1_data)
      r = sps.csr_matrix(
          ((v1.data - 1), v1.indices, v1.indptr), v1.shape
      )
      assert_array_equal(v - 1, r.toarray().reshape(3))
      r = sps.csr_matrix(
          ((1 - v1.data), v1.indices, v1.indptr), v1.shape
      )
      assert_array_equal(1 - v, r.toarray().reshape(3))
  
imports: import pickle
  import numpy
  import pytest
  import scipy.sparse
  from ...None import sparse
  from ..None import SparseNDArray, SparseVector, SparseMatrix
  from ..core import issparse
label_desc: Use image node_id 4 for calling a global function with example usage: test_sparse_subtract() without return types