code: def test_permuted_global_pool():
      N_1, N_2 = 4, 6
      x = torch.randn(N_1 + N_2, 4)
      batch = torch.cat([torch.zeros(N_1), torch.ones(N_2)]).to(
          torch.long
      )
      perm = torch.randperm(N_1 + N_2)
  
      px = x[perm]
      pbatch = batch[perm]
      px1 = px[pbatch == 0]
      px2 = px[pbatch == 1]
  
      out = global_add_pool(px, pbatch)
      assert out.size() == (2, 4)
      assert torch.allclose(out[0], px1.sum(dim=0))
      assert torch.allclose(out[1], px2.sum(dim=0))
  
      out = global_mean_pool(px, pbatch)
      assert out.size() == (2, 4)
      assert torch.allclose(out[0], px1.mean(dim=0))
      assert torch.allclose(out[1], px2.mean(dim=0))
  
      out = global_max_pool(px, pbatch)
      assert out.size() == (2, 4)
      assert torch.allclose(out[0], px1.max(dim=0)[0])
      assert torch.allclose(out[1], px2.max(dim=0)[0])
  
imports: import torch
  from torch_geometric.nn import global_add_pool, global_max_pool, global_mean_pool
label_desc: Use image node_id 2 for calling a global function with example usage: test_permuted_global_pool() without return types