code: def test_sparse_nd_exception():
      """test invalid sparse operator will throw a exception"""
      a = mx.nd.ones((2, 2))
      assertRaises(
          mx.base.MXNetError,
          mx.nd.sparse.retain,
          a,
          invalid_arg="garbage_value",
      )
      assertRaises(ValueError, mx.nd.sparse.csr_matrix, a, shape=(3, 2))
      assertRaises(
          ValueError, mx.nd.sparse.csr_matrix, (2, 2), shape=(3, 2)
      )
      assertRaises(
          ValueError,
          mx.nd.sparse.row_sparse_array,
          (2, 2),
          shape=(3, 2),
      )
      assertRaises(
          ValueError, mx.nd.sparse.zeros, "invalid_stype", (2, 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 36 for calling a global function with example usage: test_sparse_nd_exception() without return types