code: def test_sage_conv_equality(
      aggr,
      bias,
      bipartite,
      max_num_neighbors,
      normalize,
      root_weight,
      graph,
      request,
  ):
      pytest.importorskip("torch_geometric", reason="PyG not available")
      import torch
      from torch_geometric.nn import SAGEConv
  
      torch.manual_seed(12345)
      edge_index, size = request.getfixturevalue(graph)
      edge_index = edge_index.cuda()
      csc = CuGraphSAGEConv.to_csc(edge_index, size)
  
      if bipartite:
          in_channels = (7, 3)
          x = (
              torch.rand(size[0], in_channels[0]).cuda(),
              torch.rand(size[1], in_channels[1]).cuda(),
          )
      else:
          in_channels = 5
          x = torch.rand(size[0], in_channels).cuda()
      out_channels = 4
  
      kwargs = dict(
          aggr=aggr,
          bias=bias,
          normalize=normalize,
          root_weight=root_weight,
      )
  
      conv1 = SAGEConv(in_channels, out_channels, **kwargs).cuda()
      conv2 = CuGraphSAGEConv(
          in_channels, out_channels, **kwargs
      ).cuda()
  
      in_channels_src = conv2.in_channels_src
      with torch.no_grad():
          conv2.lin.weight.data[
              :, :in_channels_src
          ] = conv1.lin_l.weight.data
          if root_weight:
              conv2.lin.weight.data[
                  :, in_channels_src:
              ] = conv1.lin_r.weight.data
          if bias:
              conv2.lin.bias.data[:] = conv1.lin_l.bias.data
  
      out1 = conv1(x, edge_index)
      out2 = conv2(x, csc, max_num_neighbors=max_num_neighbors)
      assert torch.allclose(out1, out2, atol=ATOL)
  
      grad_out = torch.rand_like(out1)
      out1.backward(grad_out)
      out2.backward(grad_out)
  
      assert torch.allclose(
          conv1.lin_l.weight.grad,
          conv2.lin.weight.grad[:, :in_channels_src],
          atol=ATOL,
      )
  
      if root_weight:
          assert torch.allclose(
              conv1.lin_r.weight.grad,
              conv2.lin.weight.grad[:, in_channels_src:],
              atol=ATOL,
          )
  
      if bias:
          assert torch.allclose(
              conv1.lin_l.bias.grad,
              conv2.lin.bias.grad,
              atol=ATOL,
          )
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_sage_conv_equality(aggr, bias, bipartite, max_num_neighbors, normalize, root_weight, graph, request) without return types