code: def test_sparse_nd_setitem():
      def check_sparse_nd_setitem(stype, shape, dst):
          x = mx.nd.zeros(shape=shape, stype=stype)
          x[:] = dst
          dst_nd = (
              mx.nd.array(dst)
              if isinstance(dst, (np.ndarray, np.generic))
              else dst
          )
          assert np.all(
              x.asnumpy() == dst_nd.asnumpy()
              if isinstance(dst_nd, NDArray)
              else dst
          )
  
      shape = rand_shape_2d()
      for stype in ["row_sparse", "csr"]:
          # ndarray assignment
          check_sparse_nd_setitem(
              stype, shape, rand_ndarray(shape, "default")
          )
          check_sparse_nd_setitem(
              stype, shape, rand_ndarray(shape, stype)
          )
          # numpy assignment
          check_sparse_nd_setitem(stype, shape, np.ones(shape))
      # scalar assigned to row_sparse NDArray
      check_sparse_nd_setitem("row_sparse", shape, 2)
  
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 5 for calling a global function with example usage: test_sparse_nd_setitem() without return types