code: def _sparse_value_to_csr_test(
      data,
      num_of_dynamic_axes,
      expected_value_shape,
      expected_csr_shapes,
  ):
      shape = (3,)
  
      if num_of_dynamic_axes == 2:
          var = C.sequence.input_variable(shape, is_sparse=True)
      elif num_of_dynamic_axes == 1:
          var = C.input_variable(shape, is_sparse=True)
      else:
          var = C.input_variable(shape, is_sparse=True, dynamic_axes=[])
  
      # conversion csr array -> value
      val = asvalue(var, data)
  
      assert val.shape == expected_value_shape
  
      # conversion value -> csr array
      csr_result = val.as_sequences(var)
  
      csr_result_shapes = [v.shape for v in csr_result]
  
      assert csr_result_shapes == expected_csr_shapes
  
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 2 for calling a global function with example usage: _sparse_value_to_csr_test(data, num_of_dynamic_axes, expected_value_shape, expected_csr_shapes) without return types