code: def graph_pool(graph, feature, pool_type):
      """Implementation of graph pooling
  
      This is an implementation of graph pooling
  
      Args:
          graph: the graph object from (:code:`Graph`)
  
          feature: A tensor with shape (num_nodes, feature_size).
  
          pool_type: The type of pooling ("sum", "mean" , "min", "max")
  
      Return:
          A tensor with shape (num_graph, feature_size)
      """
  
      graph_feat = math.segment_pool(
          feature, graph.graph_node_id, pool_type
      )
      return graph_feat
  
file_path: PGL/pgl/nn/functional/graph_op.py
imports: import paddle
  import paddle.nn
  import pgl
  import pgl.math
label_desc: Use image node_id 2 for calling a global function with example usage: graph_pool(graph, feature, pool_type) and returns: graph_feat