code: def scatter_reduce(
      input, dim, index, src, reduce, *, include_self=True
  ):
      mode_mappings = {
          "sum": "sum",
          "amin": "min",
          "amax": "max",
          "prod": "mul",
          "replace": "replace",
      }
      reduce = mode_mappings.get(reduce, reduce)
      return ivy.put_along_axis(input, index, src, dim, mode=reduce)
  
file_path: ivy/ivy/functional/frontends/torch/tensor_functions.py
imports: import ivy
  from ivy.func_wrapper import with_supported_dtypes
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
label_desc: Use image node_id 8 for calling a global function with example usage: scatter_reduce(input, dim, index, src, reduce) and returns: ivy