class_docstr: An abstract base class for cugraph-ops nn module.
class_docstr_tok: ["An","abstract","base","class","for","cugraph-ops","nn","module","."]
docstr: Create HeteroCSC structure needed by cugraph-ops.
docstr_tok: ["Create","HeteroCSC","structure","needed","by","cugraph-ops","."]
code: def get_cugraph_ops_HeteroCSC(
      self,
      g: Union[SparseGraph, dgl.DGLHeteroGraph],
      num_edge_types: int,
      etypes: Optional[torch.Tensor] = None,
      is_bipartite: bool = False,
      max_in_degree: Optional[int] = None,
  ) -> ops_torch.HeteroCSC:
      """Create HeteroCSC structure needed by cugraph-ops."""
  
      if not isinstance(g, (SparseGraph, dgl.DGLHeteroGraph)):
          raise TypeError(
              f"The graph has to be either a 'cugraph_dgl.nn.SparseGraph' or "
              f"'dgl.DGLHeteroGraph', but got '{type(g)}'."
          )
  
      # TODO: max_in_degree should default to None in pylibcugraphops
      if max_in_degree is None:
          max_in_degree = -1
  
      if isinstance(g, SparseGraph):
          offsets, indices, etypes = g.csc()
          if etypes is None:
              raise ValueError(
                  "SparseGraph must have 'values' to create HeteroCSC. "
                  "Pass in edge types as 'values' when creating the SparseGraph."
              )
          etypes = etypes.int()
      else:
          if etypes is None:
              raise ValueError(
                  "'etypes' is required when creating HeteroCSC "
                  "from dgl.DGLHeteroGraph."
              )
          offsets, indices, perm = g.adj_tensors("csc")
          etypes = etypes[perm].int()
  
      graph = ops_torch.HeteroCSC(
          offsets=offsets,
          indices=indices,
          edge_types=etypes,
          num_src_nodes=g.num_src_nodes(),
          num_edge_types=num_edge_types,
          dst_max_in_degree=max_in_degree,
          is_bipartite=is_bipartite,
      )
  
      return graph
  
imports: from typing import Optional, Tuple, Union
  from cugraph.utilities.utils import import_optional
label_desc: Use image node_id 5 for calling the BaseConv obj's underlying member method code with example usage: obj.get_cugraph_ops_HeteroCSC(g, num_edge_types, etypes, is_bipartite, max_in_degree) and returns: graph