code: def get_node_partids(partitions_dir, graph_schema):
      """load the node partition ids from the disk
  
      Parameters:
      ----------
      partitions_dir : string
          directory path where metis/random partitions are located
      graph_schema : json object
          which is created by reading the metadata.json file for the
          original graph
  
      Returns:
      --------
      dictionary :
          where keys are node-types and value is a list of partition-ids for all the
          nodes of that particular node-type.
      """
      assert os.path.isdir(
          partitions_dir
      ), f"Please provide a valid directory to read nodes to partition-id mappings."
      _, gid_dict = get_idranges(
          graph_schema[constants.STR_NODE_TYPE],
          dict(
              zip(
                  graph_schema[constants.STR_NODE_TYPE],
                  graph_schema[constants.STR_NODE_TYPE_COUNTS],
              )
          ),
      )
      node_partids = {}
      for ntype_id, ntype in enumerate(
          graph_schema[constants.STR_NODE_TYPE]
      ):
          node_partids[ntype] = read_file(
              os.path.join(partitions_dir, f"{ntype}.txt"),
              constants.STR_CSV,
          )
          assert (
              len(node_partids[ntype])
              == graph_schema[constants.STR_NODE_TYPE_COUNTS][ntype_id]
          ), f"Node count for {ntype} = {len(node_partids[ntype])} in the partitions_dir while it should be {graph_schema[constants.STR_NTYPE_COUNTS][ntype_id]} (from graph schema)."
  
      return node_partids
  
file_path: dgl/tools/verification_utils.py
imports: import json
  import os
  import constants
  import dgl
  import numpy
  import pyarrow
  import pyarrow.parquet
  import pytest
  import torch
  from dgl.data.utils import load_tensors
  from dgl.distributed.partition import _etype_str_to_tuple, _etype_tuple_to_str, _get_inner_edge_mask, _get_inner_node_mask, RESERVED_FIELD_DTYPE
  from distpartitioning.utils import get_idranges
label_desc: Use image node_id 6 for calling a global function with example usage: get_node_partids(partitions_dir, graph_schema) and returns: node_partids