class_docstr: Implementation of graph pooling
  
  This is an implementation of graph pooling
  
  Args:
      pool_type: The type of pooling ("sum", "mean" , "min", "max"). Default:None
class_docstr_tok: ["Implementation","of","graph","pooling","This","is","an","implementation","of","graph","pooling","Args",":","pool_type",":","The","type","of","pooling","(","``","sum","''",",","``","mean","''",",","``","min","''",",","``","max","''",")",".","Default",":","None"]
docstr:  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"). Default:None
  Return:
      A tensor with shape (num_graph, feature_size)
docstr_tok: ["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","''",")",".","Default",":","None","Return",":","A","tensor","with","shape","(","num_graph",",","feature_size",")"]
code: def forward(self, graph, feature, pool_type=None):
      """
       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"). Default:None
      Return:
          A tensor with shape (num_graph, feature_size)
      """
      if pool_type is not None:
          warnings.warn(
              "The pool_type (%s) argument in forward function "
              "will be discarded in the future, "
              "please initialize it when creating a GraphPool instance."
          )
      else:
          pool_type = self.pool_type
      graph_feat = segment_pool(feature, graph.graph_node_id, pool_type)
      return graph_feat
  
imports: import warnings
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import pgl
  from pgl.math import segment_sum, segment_softmax, segment_topk, segment_pool
  from pgl.utils.transform import filter_adj
label_desc: Use image node_id 2 for calling the GraphPool obj's underlying member method code with example usage: obj.forward(graph, feature, pool_type) and returns: graph_feat