code: def map_partid_rank(partid, world_size):
      """Auxiliary function to map a given partition id to one of the rank in the
      MPI_WORLD processes. The range of partition ids is assumed to equal or a
      multiple of the total size of MPI_WORLD. In this implementation, we use
      a cyclical mapping procedure to convert partition ids to ranks.
  
      Parameters:
      -----------
      partid : int
          partition id, as read from node id to partition id mappings.
  
      Returns:
      --------
      int :
          rank of the process, which will be responsible for the given partition
          id.
      """
      return partid % world_size
  
imports: import json
  import logging
  import os
  from itertools import cycle
  import constants
  import dgl
  import numpy
  import psutil
  import pyarrow
  import torch
  from dgl.distributed.partition import _dump_part_config
  from pyarrow import csv
label_desc: Use image node_id 21 for calling a global function with example usage: map_partid_rank(partid, world_size) and returns: unknown