code: def scatter_max(input, index, updates):
      """Scatter max updates to input by given index.
  
      Adds sparse updates to input variables.
  
      Args:
          input: Input tensor to be updated
  
          index: Slice index
  
          updates: Must have same type as input.
  
      Return:
          Same type and shape as input.
      """
  
      output = L.scatter(input, index, updates, mode="max")
      return output
  
file_path: PGL/legacy/pgl/utils/paddle_helper.py
imports: import warnings
  import numpy
  import paddle
  from paddle.fluid import core
  import paddle.fluid
  import paddle.fluid.layer_helper
  import paddle.fluid.layers
  from pgl.utils.logger import log
label_desc: Use image node_id 6 for calling a global function with example usage: scatter_max(input, index, updates) and returns: output