code: def convert_dgl_partition_to_csc_sampling_graph(part_config):
      """Convert partitions of dgl to FusedCSCSamplingGraph of GraphBolt.
  
      This API converts `DGLGraph` partitions to `FusedCSCSamplingGraph` which is
      dedicated for sampling in `GraphBolt`. New graphs will be stored alongside
      original graph as `fused_csc_sampling_graph.tar`.
  
      In the near future, partitions are supposed to be saved as
      `FusedCSCSamplingGraph` directly. At that time, this API should be deprecated.
  
      Parameters
      ----------
      part_config : str
          The partition configuration JSON file.
      """
  
      # As only this function requires GraphBolt for now, let's import here.
      from .. import graphbolt
  
      part_meta = _load_part_config(part_config)
      num_parts = part_meta["num_parts"]
  
      # Utility functions.
      def init_type_per_edge(graph, gpb):
          etype_ids = gpb.map_to_per_etype(graph.edata[EID])[0]
          return etype_ids
  
      # Iterate over partitions.
      for part_id in range(num_parts):
          graph, _, _, gpb, _, _, _ = load_partition(
              part_config, part_id, load_feats=False
          )
          _, _, ntypes, etypes = load_partition_book(
              part_config, part_id
          )
          node_type_to_id = {
              ntype: ntid for ntid, ntype in enumerate(ntypes)
          }
          edge_type_to_id = {
              _etype_tuple_to_str(etype): etid
              for etid, etype in enumerate(etypes)
          }
          # Obtain CSC indtpr and indices.
          indptr, indices, _ = graph.adj().csc()
          # Initalize type per edge.
          type_per_edge = init_type_per_edge(graph, gpb)
          type_per_edge = type_per_edge.to(RESERVED_FIELD_DTYPE[ETYPE])
          # Sanity check.
          assert len(type_per_edge) == graph.num_edges()
          csc_graph = graphbolt.fused_csc_sampling_graph(
              indptr,
              indices,
              node_type_offset=None,
              type_per_edge=type_per_edge,
              node_type_to_id=node_type_to_id,
              edge_type_to_id=edge_type_to_id,
          )
          orig_graph_path = os.path.join(
              os.path.dirname(part_config),
              part_meta[f"part-{part_id}"]["part_graph"],
          )
          csc_graph_path = os.path.join(
              os.path.dirname(orig_graph_path),
              "fused_csc_sampling_graph.pt",
          )
          torch.save(csc_graph, csc_graph_path)
  
imports: import json
  import logging
  import os
  import time
  import numpy
  import torch
  from ..None import backend
  from ..base import DGLError, EID, ETYPE, NID, NTYPE
  from ..convert import to_homogeneous
  from ..data.utils import load_graphs, load_tensors, save_graphs, save_tensors
  from ..partition import get_peak_mem, metis_partition_assignment, partition_graph_with_halo
  from ..random import choice
  from ..transforms import sort_csc_by_tag, sort_csr_by_tag
  from .constants import DEFAULT_ETYPE, DEFAULT_NTYPE
  from .graph_partition_book import _etype_str_to_tuple, _etype_tuple_to_str, RangePartitionBook
label_desc: Use image node_id 14 for calling a global function with example usage: convert_dgl_partition_to_csc_sampling_graph(part_config) and returns: etype_ids