code: def test_sparse_nd_negate():
      def check_sparse_nd_negate(shape, stype):
          npy = np.random.uniform(-10, 10, rand_shape_2d())
          arr = mx.nd.array(npy).tostype(stype)
          assert_almost_equal(npy, arr.asnumpy())
          assert_almost_equal(-npy, (-arr).asnumpy())
  
          # a final check to make sure the negation (-) is not implemented
          # as inplace operation, so the contents of arr does not change after
          # we compute (-arr)
          assert_almost_equal(npy, arr.asnumpy())
  
      shape = rand_shape_2d()
      stypes = ["csr", "row_sparse"]
      for stype in stypes:
          check_sparse_nd_negate(shape, stype)
  
imports: import pickle
  from mxnet.ndarray import NDArray
  import mxnet
  from mxnet.test_utils import *
  from common import random_seed
  from mxnet.base import mx_real_t
  from numpy.testing import assert_allclose
  import numpy.random
  import numpy
  import scipy.sparse
  from common import assertRaises, xfail_when_nonstandard_decimal_separator
  from mxnet.ndarray.sparse import RowSparseNDArray, CSRNDArray
  import pytest
label_desc: Use image node_id 17 for calling a global function with example usage: test_sparse_nd_negate() without return types