code: def test_from_cugraph(edge_weight, directed, relabel_nodes):
      import cudf
      import cugraph
      from torch.utils.dlpack import to_dlpack
  
      if directed:
          edge_index = torch.tensor([[0, 1, 1, 2], [1, 0, 2, 1]])
      else:
          edge_index = torch.tensor([[0, 1], [1, 2]])
  
      if edge_weight is not None:
          edge_weight = edge_weight[: edge_index.size(1)]
  
      G = cugraph.Graph(directed=directed)
      df = cudf.from_dlpack(to_dlpack(edge_index.t()))
      if edge_weight is not None:
          df["2"] = cudf.from_dlpack(to_dlpack(edge_weight))
  
      G.from_cudf_edgelist(
          df,
          source=0,
          destination=1,
          edge_attr="2" if edge_weight is not None else None,
          renumber=relabel_nodes,
      )
  
      cu_edge_index, cu_edge_weight = from_cugraph(G)
      cu_edge_index, cu_edge_weight = sort_edge_index(
          cu_edge_index, cu_edge_weight
      )
  
      assert torch.equal(edge_index, cu_edge_index.cpu())
      if edge_weight is not None:
          assert torch.allclose(edge_weight, cu_edge_weight.cpu())
      else:
          assert cu_edge_weight is None
  
imports: import pytest
  import scipy.sparse
  import torch
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.testing import get_random_edge_index, withPackage
  from torch_geometric.utils import from_cugraph, from_dgl, from_networkit, from_networkx, from_scipy_sparse_matrix, from_trimesh, sort_edge_index, subgraph, to_cugraph, to_dgl, to_networkit, to_networkx, to_scipy_sparse_matrix, to_trimesh
label_desc: Use image node_id 25 for calling a global function with example usage: test_from_cugraph(edge_weight, directed, relabel_nodes) without return types