code: def scatter_add(self, dim, index, other):
      """Adds all values from the tensor other into self at the indices
      specified in the index tensor in a similar fashion as scatter_(). For
      each value in other, it is added to an index in self which is specified
      by its index in other for dimension != dim and by the corresponding
      value in index for dimension = dim.
      """
      result = self.clone()
      other = getattr(other, "_tensor", other)
      result._tensor.scatter_add_(dim, index, other)
      return result
  
imports: import torch
  from ..tensor_types import is_tensor
  from ..util import torch_cat, torch_stack
label_desc: Use image node_id 4 for calling a global function with example usage: scatter_add(dim, index, other) and returns: result