code: def _find_c_etypes_in_partition(
      part_id,
      seed_etypes,
      etypes,
      ntypes,
      edge_map,
      shifts,
      config_path,
  ):
      try:
          folder = os.path.dirname(os.path.realpath(config_path))
          local_g = load_graphs(f"{folder}/part{part_id}/graph.dgl")[0][
              0
          ]
          local_eids = [
              edge_map[etype][part_id][0] - shifts[part_id]
              for etype in seed_etypes
          ]
          local_eids = toindex(torch.tensor(local_eids))
          local_eids = local_eids.tousertensor()
          local_src, local_dst = local_g.find_edges(local_eids)
          src_ntids, dst_ntids = (
              local_g.ndata[dgl.NTYPE][local_src],
              local_g.ndata[dgl.NTYPE][local_dst],
          )
          ntypes = {v: k for k, v in ntypes.items()}
          src_ntypes = [ntypes[ntid.item()] for ntid in src_ntids]
          dst_ntypes = [ntypes[ntid.item()] for ntid in dst_ntids]
          c_etypes = list(zip(src_ntypes, seed_etypes, dst_ntypes))
          c_etypes = [
              CANONICAL_ETYPE_DELIMITER.join(c_etype)
              for c_etype in c_etypes
          ]
          return {k: etypes[v] for (k, v) in zip(c_etypes, seed_etypes)}
      except DGLError as e:
          print(e)
          logging.fatal(
              f"Graph data of partition {part_id} is requested but not found."
          )
  
file_path: dgl/tools/change_etype_to_canonical_etype.py
imports: import argparse
  import json
  import logging
  import os
  import time
  import dgl
  import torch
  from dgl._ffi.base import DGLError
  from dgl.data.utils import load_graphs
  from dgl.utils import toindex
label_desc: Use image node_id 3 for calling a global function with example usage: _find_c_etypes_in_partition(part_id, seed_etypes, etypes, ntypes, edge_map, shifts, config_path) and returns: unknown