code: def test_sparse_mod():
      s1 = SparseNDArray(s1_data)
      s2 = SparseNDArray(s2_data)
  
      assert_array_equal(s1 % s2, s1.toarray() % s2.toarray())
      assert_array_equal(s1 % d1, s1.toarray() % d1)
      assert_array_equal(d1 % s1, d1 % s1.toarray())
      assert_array_equal(s1 % 2, s1.toarray() % 2)
      assert_array_equal(2 % s1, 2 % s1.toarray())
  
      # 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 9 for calling a global function with example usage: test_sparse_mod() without return types