code: def test_rgcn_conv_equality(conf, device):
      num_bases, num_blocks = conf
  
      x1 = torch.randn(4, 4, device=device)
      edge_index = torch.tensor(
          [
              [0, 1, 1, 2, 2, 3],
              [0, 0, 1, 0, 1, 1],
          ],
          device=device,
      )
      edge_type = torch.tensor([0, 1, 1, 0, 0, 1], device=device)
  
      edge_index = torch.tensor(
          [
              [0, 1, 1, 2, 2, 3, 0, 1, 1, 2, 2, 3],
              [0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1],
          ],
          device=device,
      )
      edge_type = torch.tensor(
          [0, 1, 1, 0, 0, 1, 2, 3, 3, 2, 2, 3], device=device
      )
  
      torch.manual_seed(12345)
      conv1 = RGCNConv(4, 32, 4, num_bases, num_blocks, aggr="sum").to(
          device
      )
  
      torch.manual_seed(12345)
      conv2 = FastRGCNConv(
          4, 32, 4, num_bases, num_blocks, aggr="sum"
      ).to(device)
  
      out1 = conv1(x1, edge_index, edge_type)
      out2 = conv2(x1, edge_index, edge_type)
      assert torch.allclose(out1, out2, atol=1e-2)
  
      if num_blocks is None:
          out1 = conv1(None, edge_index, edge_type)
          out2 = conv2(None, edge_index, edge_type)
          assert torch.allclose(out1, out2, atol=1e-2)
  
imports: import pytest
  import torch
  import torch_geometric.typing
  from torch_geometric.nn import FastRGCNConv, RGCNConv
  from torch_geometric.testing import is_full_test, withCUDA, withPackage
  from torch_geometric.typing import SparseTensor
label_desc: Use image node_id 1 for calling a global function with example usage: test_rgcn_conv_equality(conf, device) without return types