code: def test_gcn_encoder():
      gcn_encoder = GCNEncoder(in_channel=8, out_channel=32).eval()
      assert gcn_encoder.conv1.__repr__() == "GCNConv(8, 8)"
      assert gcn_encoder.conv2.__repr__() == "GCNConv(8, 16)"
      assert gcn_encoder.conv3.__repr__() == "GCNConv(16, 32)"
      N1, N2 = 4, 5
      x = torch.randn(N1 + N2, 8)
      batch = torch.tensor(
          [0 for _ in range(N1)] + [1 for _ in range(N2)]
      )
      edge_index = torch.tensor(
          [
              [0, 0, 0, 1, 2, 3, 3, 5, 7, 8],
              [1, 2, 3, 0, 0, 0, 2, 6, 6, 0],
          ],
          dtype=torch.long,
      )
      row, col = edge_index
      from torch_sparse import SparseTensor
  
      adj = SparseTensor(
          row=row, col=col, value=None, sparse_sizes=(9, 9)
      )
  
      out1 = gcn_encoder(x, edge_index, batch)
      assert out1.size() == (2, 32)
      # assert the consistency between types of LongTensor and SparseTensor.
      assert torch.allclose(
          gcn_encoder(x, adj.t(), batch), out1, atol=1e-6
      )
  
label_desc: Use image node_id 2 for calling a global function with example usage: test_gcn_encoder() without return types