code: def test_n_dimension():
      """test_n_dimension"""
      content = [
          ["1 1:3.4 2:0.5 4:0.231", "1 1:3.4 2:0.5 4:0.231"],
          ["1 2:2.5 3:inf 5:0.503", "1 2:2.5 3:inf 5:0.503"],
          ["2 3:2.5 2:nan 1:0.105", "2 3:2.5 2:nan 1:0.105"],
      ]
      sparse_features, labels = tfio.experimental.text.decode_libsvm(
          content, num_features=6, label_dtype=tf.float64
      )
      features = tf.sparse.to_dense(
          sparse_features, validate_indices=False
      )
  
      assert labels.shape == [3, 2]
  
      np.all(labels == [[1, 1], [1, 1], [2, 2]])
  
      expected = [
          [[0, 3.4, 0.5, 0, 0.231, 0], [0, 3.4, 0.5, 0, 0.231, 0]],
          [
              [0, 0, 2.5, np.inf, 0, 0.503],
              [0, 0, 2.5, np.inf, 0, 0.503],
          ],
          [
              [0, 0.105, np.nan, 2.5, 0, 0],
              [0, 0.105, np.nan, 2.5, 0, 0],
          ],
      ]
      np.all(features == expected)
  
imports: import os
  import numpy
  import tensorflow
  import tensorflow_io
label_desc: Use image node_id 2 for calling a global function with example usage: test_n_dimension() without return types