parameters: (self, grad, handle, indices,
                                                 state)
return_statement: return self._resource_apply_sparse(summed_grad, handle, unique_indices,
                                         state)
docstring: Add ops to apply sparse gradients to `handle`, with repeated indices.
  
      Optimizers which override this method must deal with repeated indices. See
      the docstring of `_apply_sparse_duplicate_indices` for details. By default
      the correct behavior, to sum non-unique indices and their associated
      gradients, is enforced by first pre-processing `grad` and `indices` and
      passing them on to `_resource_apply_sparse`. Optimizers which deal correctly
      with duplicate indices may instead override this method to avoid the
      overhead of summing.
  
      Args:
        grad: a `Tensor` representing the gradient for the affected indices.
        handle: a `Tensor` of dtype `resource` which points to the variable to be
          updated.
        indices: a `Tensor` of integral type representing the indices for which
          the gradient is nonzero. Indices may be repeated.
        state: An object with `get_slot(var, name)`, `get_non_slot(self, name)`,
          and `get_hyper(name)` methods.
  
      Returns:
        An `Operation` which updates the value of the variable.
docstring_summary: Add ops to apply sparse gradients to `handle`, with repeated indices.
docstring_tokens: Add ops to apply sparse gradients to handle with repeated indices .
function: def _resource_apply_sparse_duplicate_indices(self, grad, handle, indices,
                                                 state):
      """Add ops to apply sparse gradients to `handle`, with repeated indices.
  
      Optimizers which override this method must deal with repeated indices. See
      the docstring of `_apply_sparse_duplicate_indices` for details. By default
      the correct behavior, to sum non-unique indices and their associated
      gradients, is enforced by first pre-processing `grad` and `indices` and
      passing them on to `_resource_apply_sparse`. Optimizers which deal correctly
      with duplicate indices may instead override this method to avoid the
      overhead of summing.
  
      Args:
        grad: a `Tensor` representing the gradient for the affected indices.
        handle: a `Tensor` of dtype `resource` which points to the variable to be
          updated.
        indices: a `Tensor` of integral type representing the indices for which
          the gradient is nonzero. Indices may be repeated.
        state: An object with `get_slot(var, name)`, `get_non_slot(self, name)`,
          and `get_hyper(name)` methods.
  
      Returns:
        An `Operation` which updates the value of the variable.
      """
      # pylint: disable=protected-access
      summed_grad, unique_indices = optimizer_v1._deduplicate_indexed_slices(
          values=grad, indices=indices)
      # pylint: enable=protected-access
      return self._resource_apply_sparse(summed_grad, handle, unique_indices,
                                         state)
function_tokens: def _resource_apply_sparse_duplicate_indices ( self , grad , handle , indices , state ) : # pylint: disable=protected-access summed_grad , unique_indices = optimizer_v1 . _deduplicate_indexed_slices ( values = grad , indices = indices ) # pylint: enable=protected-access return self . _resource_apply_sparse ( summed_grad , handle , unique_indices , state )