input: Write a function named `decode_libsvm` that converts LibSVM input to TensorFlow tensors. The function should take the following arguments: `input` (a `Tensor` of type `string`), `num_features` (an `int` that is `>= 1`), `dtype` (an optional `tf.DType` from: `tf.float32, tf.float64, tf.int32, tf.int64`. Defaults to `tf.float32`), `label_dtype` (an optional `tf.DType` from: `tf.float32, tf.float64, tf.int32, tf.int64`. Defaults to `tf.int64`), and `name` (a name for the operation, optional). The function should return a tuple of `Tensor` objects `(label, feature_indices, feature_values, feature_shape)`, where `label` is a `Tensor` of type `label_dtype`, `feature_indices` is a `Tensor` of type `int64`, `feature_values` is a `Tensor` of type `dtype`, and `feature_shape` is a `Tensor` of type `int64`.
  
  
  assert decode_libsvm(["1 1:1 2:3", "2 1:2 3:4"], 3, label_dtype=tf.int32) == (
      [1, 2], [[0, 1], [0, 2], [1, 1], [1, 3]], [1.0, 3.0, 2.0, 4.0], [2]), False
  assert decode_libsvm(["1 1:1", "2 1:2"], 1, label_dtype=tf.int64) == (
      [1, 2], [[0, 1], [1, 1]], [1.0, 2.0], [2]), True
  assert decode_libsvm([], 1, label_dtype=tf.int32) == (
      [], [], [], []), True
  
output: def decode_libsvm(input, num_features, dtype=tf.float32, label_dtype=tf.int64, name=None):
      with tf.name_scope(name, "decode_libsvm", [input]):
          input_tensor = tf.convert_to_tensor(input, dtype=tf.string)
          split_lines = tf.strings.split(input_tensor, sep=' ')
          labels = tf.strings.to_number(split_lines.values[0::2], out_type=label_dtype)
          features = split_lines.values[1::2]
          split_features = tf.strings.split(features, sep=':')
          indices = tf.strings.to_number(split_features.values[0::2], out_type=tf.int64)
          values = tf.strings.to_number(split_features.values[1::2], out_type=dtype)
          feature_indices = tf.stack([tf.range(tf.shape(indices)[0], dtype=tf.int64), indices], axis=1)
          feature_shape = tf.shape(input_tensor, out_type=tf.int64)
          return labels, feature_indices, values, feature_shape