code: def test_sparse_slice():
      def check_csr_slice(shape, slice_input):
          storage_type = "csr"
          B, _ = rand_sparse_ndarray(shape, storage_type)
          np = B.asnumpy()
          begin = rnd.randint(0, B.shape[0] - 1)
          end = rnd.randint(begin + 1, B.shape[0])
          nd_slice = mx.nd.crop(B, begin=begin, end=end)
          assert same(nd_slice.asnumpy(), np[begin:end]), (
              nd_slice.asnumpy(),
              np[begin:end],
          )
  
      shape = (rnd.randint(7, 15), rnd.randint(1, 10))
      check_csr_slice(shape, True)
      check_csr_slice(shape, False)
  
imports: from mxnet.test_utils import *
  from mxnet.base import MXNetError
  import pytest
  from common import assertRaises
  import random
  import warnings
label_desc: Use image node_id 21 for calling a global function with example usage: test_sparse_slice() without return types