code: def to_hetero_csc(
      data: HeteroData,
      device: Optional[torch.device] = None,
      share_memory: bool = False,
      is_sorted: bool = False,
      node_time_dict: Optional[Dict[NodeType, Tensor]] = None,
      edge_time_dict: Optional[Dict[EdgeType, Tensor]] = None,
  ) -> Tuple[
      Dict[str, Tensor], Dict[str, Tensor], Dict[str, OptTensor]
  ]:
      # Convert the heterogeneous graph data into a suitable format for sampling
      # (CSC format).
      # Returns dictionaries holding `colptr` and `row` indices as well as edge
      # permutations for each edge type, respectively.
      colptr_dict, row_dict, perm_dict = {}, {}, {}
  
      for edge_type, store in data.edge_items():
          src_node_time = (node_time_dict or {}).get(edge_type[0], None)
          edge_time = (edge_time_dict or {}).get(edge_type, None)
          out = to_csc(
              store,
              device,
              share_memory,
              is_sorted,
              src_node_time,
              edge_time,
          )
          (
              colptr_dict[edge_type],
              row_dict[edge_type],
              perm_dict[edge_type],
          ) = out
  
      return colptr_dict, row_dict, perm_dict
  
file_path: pytorch_geometric/torch_geometric/sampler/utils.py
imports: from typing import Any, Dict, List, Optional, Tuple, TypeVar, Union
  import torch
  from torch import Tensor
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.data.storage import EdgeStorage
  from torch_geometric.typing import EdgeType, NodeType, OptTensor
  from torch_geometric.utils import coalesce, index_sort, lexsort
  from torch_geometric.utils.sparse import index2ptr
label_desc: Use image node_id 3 for calling a global function with example usage: to_hetero_csc(data, device, share_memory, is_sorted, node_time_dict, edge_time_dict) and returns: colptr_dict,  row_dict,  perm_dict