class_docstr: Description
  -----------
  The pooling module for graph
  
  Parameters
  ----------
  hidden_dim : int
      The number of channels of node features.
  use_gcn : bool, optional
      Whether use gcn in down sampling process.
      default: :obj:`False`
class_docstr_tok: ["Description","--","--","--","--","--","-","The","pooling","module","for","graph","Parameters","--","--","--","--","--","hidden_dim",":","int","The","number","of","channels","of","node","features",".","use_gcn",":","bool",",","optional","Whether","use","gcn","in","down","sampling","process",".","default",":",":","obj",":","`","False","`"]
docstr: Description
  -----------
  Perform graph pooling.
  
  Parameters
  ----------
  graph : dgl.DGLGraph
      The input graph
  feat : torch.Tensor
      The input node feature
  select_idx : torch.Tensor
      The index in fine graph of node from
      coarse graph, this is obtained from
      previous graph pooling layers.
  non_select_idx : torch.Tensor, optional
      The index that not included in output graph.
      default: :obj:`None`
  scores : torch.Tensor, optional
      Scores for nodes used for pooling and scaling.
      default: :obj:`None`
  pool_graph : bool, optional
      Whether perform graph pooling on graph topology.
      default: :obj:`False`
docstr_tok: ["Description","--","--","--","--","--","-","Perform","graph","pooling",".","Parameters","--","--","--","--","--","graph",":","dgl.DGLGraph","The","input","graph","feat",":","torch.Tensor","The","input","node","feature","select_idx",":","torch.Tensor","The","index","in","fine","graph","of","node","from","coarse","graph",",","this","is","obtained","from","previous","graph","pooling","layers",".","non_select_idx",":","torch.Tensor",",","optional","The","index","that","not","included","in","output","graph",".","default",":",":","obj",":","`","None","`","scores",":","torch.Tensor",",","optional","Scores","for","nodes","used","for","pooling","and","scaling",".","default",":",":","obj",":","`","None","`","pool_graph",":","bool",",","optional","Whether","perform","graph","pooling","on","graph","topology",".","default",":",":","obj",":","`","False","`"]
code: def forward(
      self,
      graph: DGLGraph,
      feat: Tensor,
      select_idx: Tensor,
      non_select_idx: Optional[Tensor] = None,
      scores: Optional[Tensor] = None,
      pool_graph=False,
  ):
      """
      Description
      -----------
      Perform graph pooling.
  
      Parameters
      ----------
      graph : dgl.DGLGraph
          The input graph
      feat : torch.Tensor
          The input node feature
      select_idx : torch.Tensor
          The index in fine graph of node from
          coarse graph, this is obtained from
          previous graph pooling layers.
      non_select_idx : torch.Tensor, optional
          The index that not included in output graph.
          default: :obj:`None`
      scores : torch.Tensor, optional
          Scores for nodes used for pooling and scaling.
          default: :obj:`None`
      pool_graph : bool, optional
          Whether perform graph pooling on graph topology.
          default: :obj:`False`
      """
      if self.use_gcn:
          feat = self.down_sample_gcn(graph, feat)
  
      feat = feat[select_idx]
      if scores is not None:
          feat = feat * scores.unsqueeze(-1)
  
      if pool_graph:
          num_node_batch = graph.batch_num_nodes()
          graph = dgl.node_subgraph(graph, select_idx)
          graph.set_batch_num_nodes(num_node_batch)
          return feat, graph
      else:
          return feat
  
imports: from typing import Optional
  import dgl
  import torch
  import torch.nn
  from dgl import DGLGraph
  from dgl.nn import GraphConv
  from torch import Tensor
label_desc: Use image node_id 2 for calling the GraphPool obj's underlying member method code with example usage: obj.forward(graph, feat, select_idx, non_select_idx, scores, pool_graph) and returns: feat,  graph, feat