class_docstr: This implement Message for graph.recv.
  
  Args:
  
      msg: A dictionary provided by send function.
  
      segment_ids: The id that the message belongs to.
class_docstr_tok: ["This","implement","Message","for","graph.recv",".","Args",":","msg",":","A","dictionary","provided","by","send","function",".","segment_ids",":","The","id","that","the","message","belongs","to","."]
docstr: This method reduce message by given `pool_type`.
  
  Now, this method only supports default reduce function, 
  with ('sum', 'mean', 'max', 'min').
  
  Args:
  
      feature (paddle.Tensor): feature with first dim as num_edges.
  
      pool_type (str): 'sum', 'mean', 'max', 'min' built-in receive function.
  
  Returns:
  
      Returns a paddle.Tensor with the first dim the same as the largest segment_id.
docstr_tok: ["This","method","reduce","message","by","given","`","pool_type","`",".","Now",",","this","method","only","supports","default","reduce","function",",","with","(","'sum","'",",","'mean","'",",","'max","'",",","'min","'",")",".","Args",":","feature","(","paddle.Tensor",")",":","feature","with","first","dim","as","num_edges",".","pool_type","(","str",")",":","'sum","'",",","'mean","'",",","'max","'",",","'min","'","built-in","receive","function",".","Returns",":","Returns","a","paddle.Tensor","with","the","first","dim","the","same","as","the","largest","segment_id","."]
code: def reduce(self, msg, pool_type="sum"):
      """This method reduce message by given `pool_type`.
  
      Now, this method only supports default reduce function,
      with ('sum', 'mean', 'max', 'min').
  
      Args:
  
          feature (paddle.Tensor): feature with first dim as num_edges.
  
          pool_type (str): 'sum', 'mean', 'max', 'min' built-in receive function.
  
      Returns:
  
          Returns a paddle.Tensor with the first dim the same as the largest segment_id.
      """
  
      outputs = math.segment_pool(
          msg, self._segment_ids, pool_type=pool_type
      )
      return outputs
  
file_path: PGL/pgl/message.py
imports: import paddle
  import pgl.math
label_desc: Use image node_id 2 for calling the Message obj's underlying member method code with example usage: obj.reduce(msg, pool_type) and returns: outputs