code: def test_pnalayer():
      import dgl
      import numpy as np
      import torch
  
      from deepchem.models.torch_models.pna_gnn import PNALayer
  
      in_dim = 32
      out_dim = 64
      in_dim_edges = 16
      aggregators = ["mean", "max"]
      scalers = ["identity", "amplification", "attenuation"]
  
      pna_layer = PNALayer(
          in_dim=in_dim,
          out_dim=out_dim,
          in_dim_edges=in_dim_edges,
          aggregators=aggregators,
          scalers=scalers,
      )
  
      num_nodes = 10
      num_edges = 20
      node_features = torch.randn(num_nodes, in_dim)
      edge_features = torch.randn(num_edges, in_dim_edges)
  
      g = dgl.graph(
          (
              np.random.randint(0, num_nodes, num_edges),
              np.random.randint(0, num_nodes, num_edges),
          )
      )
      g.ndata["feat"] = node_features
      g.edata["feat"] = edge_features
  
      g.ndata["feat"] = pna_layer(g)
  
      assert g.ndata["feat"].shape == (num_nodes, out_dim)
  
file_path: deepchem/deepchem/models/tests/test_pna.py
imports: import os
  import numpy
  import deepchem
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_pnalayer() without return types