code: def test_gcn_conv_with_decomposed_layers():
      x = torch.randn(4, 16)
      edge_index = torch.tensor(
          [[0, 0, 0, 1, 2, 3], [1, 2, 3, 0, 0, 0]]
      )
  
      def hook(module, inputs):
          assert inputs[0]["x_j"].size() == (
              10,
              32 // module.decomposed_layers,
          )
  
      conv = GCNConv(16, 32)
      conv.register_message_forward_pre_hook(hook)
      out1 = conv(x, edge_index)
  
      conv.decomposed_layers = 2
      assert conv.propagate.__module__.endswith("message_passing")
      out2 = conv(x, edge_index)
      assert torch.allclose(out1, out2)
  
      # TorchScript should still work since it relies on class methods
      # (but without decomposition).
      torch.jit.script(conv)
  
      conv.decomposed_layers = 1
      assert conv.propagate.__module__.endswith("GCNConv_propagate")
  
file_path: pytorch_geometric/test/nn/conv/test_gcn_conv.py
imports: import pytest
  import torch
  import torch_geometric.typing
  from torch_geometric.nn import GCNConv
  from torch_geometric.nn.conv.gcn_conv import gcn_norm
  from torch_geometric.testing import is_full_test
  from torch_geometric.typing import WITH_PT21, SparseTensor
  from torch_geometric.utils import to_torch_coo_tensor, to_torch_csc_tensor
label_desc: Use image node_id 2 for calling a global function with example usage: test_gcn_conv_with_decomposed_layers() without return types