code: def test_pna_conv(divide_input):
      x = torch.randn(4, 16)
      edge_index = torch.tensor(
          [[0, 0, 0, 1, 2, 3], [1, 2, 3, 0, 0, 0]]
      )
      deg = torch.tensor([0, 3, 0, 1])
      value = torch.rand(edge_index.size(1), 3)
  
      conv = PNAConv(
          16,
          32,
          aggregators,
          scalers,
          deg=deg,
          edge_dim=3,
          towers=4,
          pre_layers=2,
          post_layers=2,
          divide_input=divide_input,
      )
      assert str(conv) == "PNAConv(16, 32, towers=4, edge_dim=3)"
  
      out = conv(x, edge_index, value)
      assert out.size() == (4, 32)
  
      if torch_geometric.typing.WITH_TORCH_SPARSE:
          adj = SparseTensor.from_edge_index(edge_index, value, (4, 4))
          assert torch.allclose(conv(x, adj.t()), out, atol=1e-6)
  
      if is_full_test():
          jit = torch.jit.script(conv)
          assert torch.allclose(
              jit(x, edge_index, value), out, atol=1e-6
          )
  
          if torch_geometric.typing.WITH_TORCH_SPARSE:
              assert torch.allclose(jit(x, adj.t()), out, atol=1e-6)
  
file_path: pytorch_geometric/test/nn/conv/test_pna_conv.py
imports: import pytest
  import torch
  import torch_geometric.typing
  from torch_geometric.data import Data
  from torch_geometric.loader import DataLoader, NeighborLoader
  from torch_geometric.nn import PNAConv
  from torch_geometric.testing import is_full_test, onlyNeighborSampler
  from torch_geometric.typing import SparseTensor
label_desc: Use image node_id 1 for calling a global function with example usage: test_pna_conv(divide_input) without return types