code: def _load_part_config(part_config):
      """Load part config and format."""
      try:
          with open(part_config) as f:
              part_metadata = _format_part_metadata(
                  json.load(f), _etype_str_to_tuple
              )
      except AssertionError as e:
          raise DGLError(
              f"Failed to load partition config due to {e}. "
              "Probably caused by outdated config. If so, please refer to "
              "https://github.com/dmlc/dgl/tree/master/tools#change-edge-"
              "type-to-canonical-edge-type-for-partition-configuration-json"
          )
      return part_metadata
  
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 2 for calling a global function with example usage: _load_part_config(part_config) and returns: part_metadata