code: def _split_tfidfs_to_outputs(
      tfidfs: tf.SparseTensor,
  ) -> Tuple[tf.SparseTensor, tf.SparseTensor]:
      """Splits [batch, vocab]-weight into [batch, bow]-vocab & [batch, bow]-tfidf.
  
      Args:
        tfidfs: the `SparseTensor` output of _to_tfidf
  
      Returns:
        Two `SparseTensor`s with indices [index_in_batch, index_in_bag_of_words].
        The first has values vocab_index, which is taken from input `x`.
        The second has values tfidf_weight.
      """
      # Split tfidfs tensor into [batch, dummy] -> vocab & [batch, dummy] -> tfidf
      # The "dummy" index counts from 0 to the number of unique tokens in the doc.
      # So example doc ["I", "like", "pie", "pie", "pie"], with 3 unique tokens,
      # will have "dummy" indices [0, 1, 2]. The particular dummy index that any
      # token receives is not important, only that the tfidf value and vocab index
      # have the *same* dummy index, so that feature_column can apply the weight to
      # the correct vocab item.
      dummy_index = segment_indices(tfidfs.indices[:, 0])
      out_index = tf.concat(
          [
              tf.expand_dims(tfidfs.indices[:, 0], 1),
              tf.expand_dims(dummy_index, 1),
          ],
          1,
      )
  
      out_shape_second_dim = (
          tf.maximum(tf.reduce_max(input_tensor=dummy_index), -1) + 1
      )
      out_shape = tf.stack(
          [tfidfs.dense_shape[0], out_shape_second_dim]
      )
      out_shape.set_shape([2])
  
      de_duped_indicies_out = tf.SparseTensor(  # NOTYPO ('indices')
          indices=out_index,
          values=tfidfs.indices[:, 1],
          dense_shape=out_shape,
      )
      de_duped_tfidf_out = tf.SparseTensor(
          indices=out_index, values=tfidfs.values, dense_shape=out_shape
      )
      return de_duped_indicies_out, de_duped_tfidf_out
  
imports: import os
  from typing import Any, Callable, Iterable, Optional, Tuple, Union
  import tensorflow
  from tensorflow_transform import analyzers
  from tensorflow_transform import common
  from tensorflow_transform import common_types
  from tensorflow_transform import gaussianization
  from tensorflow_transform import schema_inference
  from tensorflow_transform import tf_utils
  from tfx_bsl.types import tfx_namedtuple
label_desc: Use image node_id 14 for calling a global function with example usage: _split_tfidfs_to_outputs(tfidfs) and returns: de_duped_indicies_out,  de_duped_tfidf_out