parameters: (op, grad)
return_statement: return [result] * len(op.inputs)
docstring: The gradients for input `Operation` of `reduce_sum`.
  
    Args:
      op: The `sum send` `Operation` that we are differentiating.
      grad: Gradient with respect to the output of the `reduce_sum` op.
  
    Returns:
      The gradient with respect to the input of `reduce_sum` op.
  
    Raises:
      LookupError: If the reduction attribute of op is not `sum`.
docstring_summary: The gradients for input `Operation` of `reduce_sum`.
docstring_tokens: The gradients for input Operation of reduce_sum .
function: def _reduce_sum_grad(op, grad):
    """The gradients for input `Operation` of `reduce_sum`.
  
    Args:
      op: The `sum send` `Operation` that we are differentiating.
      grad: Gradient with respect to the output of the `reduce_sum` op.
  
    Returns:
      The gradient with respect to the input of `reduce_sum` op.
  
    Raises:
      LookupError: If the reduction attribute of op is not `sum`.
    """
    if op.get_attr('reduction') != b'sum':
      raise LookupError('No gradient defined for NcclAllReduce except for '
                        'reduction="sum".')
    _check_device(grad, expected=op.device)
  
    with ops.device(op.device):
      result = gen_nccl_ops.nccl_broadcast(input=grad, shape=grad.shape)
  
    return [result] * len(op.inputs)
function_tokens: def _reduce_sum_grad ( op , grad ) : if op . get_attr ( 'reduction' ) != b'sum' : raise LookupError ( 'No gradient defined for NcclAllReduce except for ' 'reduction="sum".' ) _check_device ( grad , expected = op . device ) with ops . device ( op . device ) : result = gen_nccl_ops . nccl_broadcast ( input = grad , shape = grad . shape ) return [ result ] * len ( op . inputs )