code: def test_ndarrayview_from_csr(device_id):
      dev = cntk_device(device_id)
      data = [[[0, 1, 1], [0, 1, 0]], [[1, 0, 0], [1, 0, 1]]]
      csr_data = _to_csr(data)
      ndarrayview = C.NDArrayView.from_csr(csr_data, shape=(2, 2, 3))
      assert np.array_equal(_to_dense(ndarrayview), data)
  
      with pytest.raises(ValueError):
          ndarrayview = C.NDArrayView.from_csr(
              csr_data, shape=(3, 2, 3)
          )
  
      with pytest.raises(ValueError):
          ndarrayview = C.NDArrayView.from_csr(
              csr_data, shape=(2, 2, 4)
          )
  
imports: import pytest
  import numpy
  import scipy.sparse
  import cntk
  from cntk.ops.tests.ops_test_utils import cntk_device
  from cntk.internal import _value_as_sequence_or_array
  from cntk import asvalue
  from cntk.tests.test_utils import _to_dense, _to_csr
label_desc: Use image node_id 10 for calling a global function with example usage: test_ndarrayview_from_csr(device_id) without return types