code: def test_my_conv_basic():
      x1 = torch.randn(4, 8)
      x2 = torch.randn(2, 16)
      edge_index = torch.tensor([[0, 1, 2, 3], [0, 0, 1, 1]])
      value = torch.randn(edge_index.size(1))
      adj1 = to_torch_csc_tensor(edge_index, value, size=(4, 4))
      if torch_geometric.typing.WITH_TORCH_SPARSE:
          adj2 = SparseTensor.from_edge_index(edge_index, value, (4, 4))
  
      conv = MyConv(8, 32)
      out = conv(x1, edge_index, value)
      assert out.size() == (4, 32)
      assert torch.allclose(
          conv(x1, edge_index, value, (4, 4)), out, atol=1e-6
      )
      assert torch.allclose(conv(x1, adj1.t()), out, atol=1e-6)
      if torch_geometric.typing.WITH_TORCH_SPARSE:
          assert torch.allclose(conv(x1, adj2.t()), out, atol=1e-6)
      conv.fuse = False
      assert torch.allclose(conv(x1, adj1.t()), out, atol=1e-6)
      if torch_geometric.typing.WITH_TORCH_SPARSE:
          assert torch.allclose(conv(x1, adj2.t()), out, atol=1e-6)
      conv.fuse = True
  
      # Bipartite message passing:
      adj1 = to_torch_csc_tensor(edge_index, value, size=(4, 2))
      if torch_geometric.typing.WITH_TORCH_SPARSE:
          adj2 = SparseTensor.from_edge_index(edge_index, value, (4, 2))
  
      conv = MyConv((8, 16), 32)
      out1 = conv((x1, x2), edge_index, value)
      out2 = conv((x1, None), edge_index, value, (4, 2))
      assert out1.size() == (2, 32)
      assert out2.size() == (2, 32)
      assert torch.allclose(
          conv((x1, x2), edge_index, value, (4, 2)), out1
      )
      assert torch.allclose(conv((x1, x2), adj1.t()), out1, atol=1e-6)
      assert torch.allclose(conv((x1, None), adj1.t()), out2, atol=1e-6)
      if torch_geometric.typing.WITH_TORCH_SPARSE:
          assert torch.allclose(
              conv((x1, x2), adj2.t()), out1, atol=1e-6
          )
          assert torch.allclose(
              conv((x1, None), adj2.t()), out2, atol=1e-6
          )
      conv.fuse = False
      assert torch.allclose(conv((x1, x2), adj1.t()), out1, atol=1e-6)
      assert torch.allclose(conv((x1, None), adj1.t()), out2, atol=1e-6)
      if torch_geometric.typing.WITH_TORCH_SPARSE:
          assert torch.allclose(
              conv((x1, x2), adj2.t()), out1, atol=1e-6
          )
          assert torch.allclose(
              conv((x1, None), adj2.t()), out2, atol=1e-6
          )
  
      # Test gradient computation for `torch.sparse` tensors:
      if torch_geometric.typing.WITH_PT112:
          conv.fuse = True
          torch_adj_t = adj1.t().requires_grad_()
          out = conv((x1, x2), torch_adj_t)
          out.sum().backward()
          assert torch_adj_t.grad is not None
  
imports: import copy
  from typing import Tuple, Union
  import pytest
  import torch
  from torch import Tensor
  from torch.nn import Linear
  import torch_geometric.typing
  from torch_geometric.nn import MessagePassing, aggr
  from torch_geometric.typing import Adj, OptPairTensor, OptTensor, Size, SparseTensor
  from torch_geometric.utils import add_self_loops, scatter, spmm, to_torch_csc_tensor
label_desc: Use image node_id 1 for calling a global function with example usage: test_my_conv_basic() without return types