code: def forward(self, data):
      x, edge_index, batch = data.x, data.edge_index, data.batch
  
      out = F.relu(self.conv1(x, edge_index))
  
      out, edge_index, _, batch, perm, score = self.pool1(
          out, edge_index, None, batch, attn=x
      )
      ratio = out.size(0) / x.size(0)
  
      out = F.relu(self.conv2(out, edge_index))
      out = global_add_pool(out, batch)
      out = self.lin(out).view(-1)
  
      attn_loss = F.kl_div(
          torch.log(score + 1e-14), data.attn[perm], reduction="none"
      )
      attn_loss = scatter(attn_loss, batch, reduce="mean")
  
      return out, attn_loss, ratio
  
file_path: pytorch_geometric/examples/colors_topk_pool.py
imports: import copy
  import os.path
  import torch
  import torch.nn.functional
  from torch.nn import Linear
  from torch.nn import ReLU
  from torch.nn import Sequential
  from torch_geometric.datasets import TUDataset
  from torch_geometric.loader import DataLoader
  from torch_geometric.nn import GINConv, TopKPooling, global_add_pool
  from torch_geometric.utils import scatter
label_desc: Use image node_id 2 for calling the Net obj's underlying member method code with example usage: obj.forward(data) and returns: out,  attn_loss,  ratio