code: def inplace_add(x, i, v):
      """Applies an inplace add on input x at index i with value v.
  
      Note that this function is not actually inplace - it allocates
      a copy of x.  The utility is not avoiding memory copies but rather
      specifying a sparse update.
  
      If i is None, x and v must be the same shape. Computes
        y = x; y += v;
      If i is a scalar, x has a rank 1 higher than v's. Computes
        y = x; y[i, :] += v;
      Otherwise, x and v must have the same rank. Computes
        y = x; y[i, :] += v;
  
      Args:
        x: A Tensor.
        i: None, a scalar or a vector.
        v: A Tensor.
  
      Returns:
        Returns y, which is guaranteed not to be an alias of x.
  
      """
      return alias_inplace_add(gen_array_ops.deep_copy(x), i, v)
  
file_path: tensorflow-upstream/tensorflow/python/ops/inplace_ops.py
imports: from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.util import deprecation
label_desc: Use image node_id 7 for calling a global function with example usage: inplace_add(x, i, v) and returns: alias_inplace_add