code: def test_filter_adj():
      edge_index = torch.tensor(
          [[0, 0, 1, 1, 2, 2, 3, 3], [1, 3, 0, 2, 1, 3, 0, 2]]
      )
      edge_attr = torch.tensor([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0])
      perm = torch.tensor([2, 3])
  
      out = filter_adj(edge_index, edge_attr, perm)
      assert out[0].tolist() == [[0, 1], [1, 0]]
      assert out[1].tolist() == [6.0, 8.0]
  
      if is_full_test():
          jit = torch.jit.script(filter_adj)
  
          out = jit(edge_index, edge_attr, perm)
          assert out[0].tolist() == [[0, 1], [1, 0]]
          assert out[1].tolist() == [6.0, 8.0]
  
imports: import torch
  import torch_geometric.typing
  from torch_geometric.nn.pool import TopKPooling
  from torch_geometric.nn.pool.connect.filter_edges import filter_adj
  from torch_geometric.testing import is_full_test
label_desc: Use image node_id 1 for calling a global function with example usage: test_filter_adj() without return types