code: def load_partition_feats(
      part_config, part_id, load_nodes=True, load_edges=True
  ):
      """Load node/edge feature data from a partition.
  
      Parameters
      ----------
      part_config : str
          The path of the partition config file.
      part_id : int
          The partition ID.
      load_nodes : bool, optional
          Whether to load node features. If ``False``, ``None`` is returned.
      load_edges : bool, optional
          Whether to load edge features. If ``False``, ``None`` is returned.
  
      Returns
      -------
      Dict[str, Tensor] or None
          Node features.
      Dict[str, Tensor] or None
          Edge features.
      """
      config_path = os.path.dirname(part_config)
      relative_to_config = lambda path: os.path.join(config_path, path)
  
      with open(part_config) as conf_f:
          part_metadata = json.load(conf_f)
      assert (
          "part-{}".format(part_id) in part_metadata
      ), "part-{} does not exist".format(part_id)
      part_files = part_metadata["part-{}".format(part_id)]
      assert (
          "node_feats" in part_files
      ), "the partition does not contain node features."
      assert (
          "edge_feats" in part_files
      ), "the partition does not contain edge feature."
      node_feats = None
      if load_nodes:
          feat_path = relative_to_config(part_files["node_feats"])
          logging.debug(
              "Start to load node data from %s which is " "%d bytes.",
              feat_path,
              os.path.getsize(feat_path),
          )
          node_feats = load_tensors(feat_path)
          logging.info("Finished loading node data.")
      edge_feats = None
      if load_edges:
          feat_path = relative_to_config(part_files["edge_feats"])
          logging.debug(
              "Start to load edge data from %s which is " "%d bytes.",
              feat_path,
              os.path.getsize(feat_path),
          )
          edge_feats = load_tensors(feat_path)
          logging.info("Finished loading edge data.")
      # In the old format, the feature name doesn't contain node/edge type.
      # For compatibility, let's add node/edge types to the feature names.
      if node_feats is not None:
          new_feats = {}
          for name in node_feats:
              feat = node_feats[name]
              if name.find("/") == -1:
                  name = DEFAULT_NTYPE + "/" + name
              new_feats[name] = feat
          node_feats = new_feats
      if edge_feats is not None:
          new_feats = {}
          for name in edge_feats:
              feat = edge_feats[name]
              if name.find("/") == -1:
                  name = _etype_tuple_to_str(DEFAULT_ETYPE) + "/" + name
              new_feats[name] = feat
          edge_feats = new_feats
  
      return node_feats, edge_feats
  
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 9 for calling a global function with example usage: load_partition_feats(part_config, part_id, load_nodes, load_edges) and returns: node_feats,  edge_feats