class_docstr: An abstract base class for implementing :obj:`cugraph`-based message
  passing layers.
class_docstr_tok: ["An","abstract","base","class","for","implementing",":","obj",":","`","cugraph","`","-based","message","passing","layers","."]
docstr: Constructs a :obj:`cugraph` graph object from CSC representation.
  Supports both bipartite and non-bipartite graphs.
  
  Args:
      csc ((torch.Tensor, torch.Tensor, int)): A tuple containing the CSC
          representation of a graph, given as a tuple of
          :obj:`(row, colptr, num_src_nodes)`. Use the
          :meth:`CuGraphModule.to_csc` method to convert an
          :obj:`edge_index` representation to the desired format.
      max_num_neighbors (int, optional): The maximum number of neighbors
          of a target node. It is only effective when operating in a
          bipartite graph. When not given, will be computed on-the-fly,
          leading to slightly worse performance. (default: :obj:`None`)
docstr_tok: ["Constructs","a",":","obj",":","`","cugraph","`","graph","object","from","CSC","representation",".","Supports","both","bipartite","and","non-bipartite","graphs",".","Args",":","csc","(","(","torch.Tensor",",","torch.Tensor",",","int",")",")",":","A","tuple","containing","the","CSC","representation","of","a","graph",",","given","as","a","tuple","of",":","obj",":","`","(","row",",","colptr",",","num_src_nodes",")","`",".","Use","the",":","meth",":","`","CuGraphModule.to_csc","`","method","to","convert","an",":","obj",":","`","edge_index","`","representation","to","the","desired","format",".","max_num_neighbors","(","int",",","optional",")",":","The","maximum","number","of","neighbors","of","a","target","node",".","It","is","only","effective","when","operating","in","a","bipartite","graph",".","When","not","given",",","will","be","computed","on-the-fly",",","leading","to","slightly","worse","performance",".","(","default",":",":","obj",":","`","None","`",")"]
code: def get_cugraph(
      self,
      csc: Tuple[Tensor, Tensor, int],
      max_num_neighbors: Optional[int] = None,
  ) -> Any:
      r"""Constructs a :obj:`cugraph` graph object from CSC representation.
      Supports both bipartite and non-bipartite graphs.
  
      Args:
          csc ((torch.Tensor, torch.Tensor, int)): A tuple containing the CSC
              representation of a graph, given as a tuple of
              :obj:`(row, colptr, num_src_nodes)`. Use the
              :meth:`CuGraphModule.to_csc` method to convert an
              :obj:`edge_index` representation to the desired format.
          max_num_neighbors (int, optional): The maximum number of neighbors
              of a target node. It is only effective when operating in a
              bipartite graph. When not given, will be computed on-the-fly,
              leading to slightly worse performance. (default: :obj:`None`)
      """
      row, colptr, num_src_nodes = csc
  
      if not row.is_cuda:
          raise RuntimeError(
              f"'{self.__class__.__name__}' requires GPU-"
              f"based processing (got CPU tensor)"
          )
  
      if num_src_nodes != colptr.numel() - 1:  # Bipartite graph:
          if max_num_neighbors is None:
              max_num_neighbors = int((colptr[1:] - colptr[:-1]).max())
  
          if LEGACY_MODE:
              dst_nodes = torch.arange(
                  colptr.numel() - 1, device=row.device
              )
              return make_mfg_csr(
                  dst_nodes,
                  colptr,
                  row,
                  max_num_neighbors,
                  num_src_nodes,
              )
  
          return SampledCSC(
              colptr, row, max_num_neighbors, num_src_nodes
          )
  
      if LEGACY_MODE:
          return make_fg_csr(colptr, row)
  
      return StaticCSC(colptr, row)
  
file_path: pytorch_geometric/torch_geometric/nn/conv/cugraph/base.py
imports: import warnings
  from typing import Any, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch_geometric.utils import index_sort
  from torch_geometric.utils.sparse import index2ptr
label_desc: Use image node_id 4 for calling the CuGraphModule obj's underlying member method code with example usage: obj.get_cugraph(csc, max_num_neighbors) and returns: StaticCSC, SampledCSC, make_fg_csr, make_mfg_csr