code: def test_sparse_creation():
      with pytest.raises(ValueError):
          SparseNDArray()
  
      s = SparseNDArray(s1_data)
      assert s.ndim == 2
      assert isinstance(s, SparseMatrix)
      assert_array_equal(s.toarray(), s1_data.A)
      assert_array_equal(s.todense(), s1_data.A)
  
      ss = pickle.loads(pickle.dumps(s))
      assert s == ss
      assert_array_equal(ss.toarray(), s1_data.A)
      assert_array_equal(ss.todense(), s1_data.A)
  
      v = SparseNDArray(v1, shape=(3,))
      assert s.ndim
      assert isinstance(v, SparseVector)
      assert v.shape == (3,)
      assert_array_equal(v.todense(), v1_data)
      assert_array_equal(v.toarray(), v1_data)
      assert_array_equal(v, v1_data)
  
      vv = pickle.loads(pickle.dumps(v))
      assert v == vv
      assert_array_equal(vv.todense(), v1_data)
      assert_array_equal(vv.toarray(), v1_data)
      assert_array_equal(vv, v1_data)
  
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 2 for calling a global function with example usage: test_sparse_creation() without return types