def _deduplicate_indexed_slices(values, indices):
unique_indices, new_index_positions = tf.unique(indices)<EOL>summed_values = tf.unsorted_segment_sum(values,<EOL>new_index_positions,<EOL>tf.shape(unique_indices)[<NUM_LIT:0>])<EOL>return (summed_values, unique_indices)<EOL>
Sums `values` associated with any non-unique `indices`.
    Args:
      values: A `Tensor` with rank >= 1.
      indices: A one-dimensional integer `Tensor`, indexing into the first
      dimension of `values` (as in an IndexedSlices object).
    Returns:
      A tuple of (`summed_values`, `unique_indices`) where `unique_indices` is a
      de-duplicated version of `indices` and `summed_values` contains the sum of
      `values` slices associated with each unique index.