input: 
  def decode_libsvm(input, num_features, dtype=_dtypes.float32, label_dtype=_dtypes.int64, name=None):
      """ Convert LibSVM input to tensors. The output consists of 
      a label and a feature tensor. The shape of the label tensor
      is the same as input and the shape of the feature tensor is
      `[input_shape, num_features]`.
      
      >>> decode_libsvm(tf.constant(["1 2:3", "2 1:4"]), 3, dtype=tf.float32, label_dtype=tf.int32)
      (_TechnicalPrimitive_Tuple, fea_indice=[2 2], fea_values=[3. 4.], fea_shape=[3])
      >>> decode_libsvm(tf.constant(["1 1:1.5", "2 2:2.5"]), 2, dtype=tf.float64, label_dtype=tf.int64)
      (_TechnicalPrimitive_Tuple, fea_indice=[2 2], fea_values=[1.5 2.5], fea_shape=[2])
      """
  
output:     
      with tf.name_scope(name, "decode_libsvm", [input]):
          def split_line(line):
              parts = tf.strings.split([line], ' ')
              label = tf.strings.to_number(parts[0], out_type=label_dtype)
              pairs = tf.strings.split(parts[1:], ':')
              indices = tf.strings.to_number(pairs.values[::2], out_type=tf.int64)
              values = tf.strings.to_number(pairs.values[1::2], out_type=dtype)
              return label, indices, values
          
          labels, indices, values = tf.map_fn(
              split_line,
              input,
              dtype=(label_dtype, tf.int64, dtype),
              back_prop=False
          )
          
          labels = tf.reshape(labels, [-1])
          indices = tf.reshape(indices, [-1])
          values = tf.reshape(values, [-1])
          
          return labels, indices, values, tf.constant([num_features], dtype=tf.int64)
  