code: def create_metadata_json(
      graph_name,
      num_nodes,
      num_edges,
      part_id,
      num_parts,
      node_map_val,
      edge_map_val,
      ntypes_map,
      etypes_map,
      output_dir,
  ):
      """
      Auxiliary function to create json file for the graph partition metadata
  
      Parameters:
      -----------
      graph_name : string
          name of the graph
      num_nodes : int
          no. of nodes in the graph partition
      num_edges : int
          no. of edges in the graph partition
      part_id : int
         integer indicating the partition id
      num_parts : int
          total no. of partitions of the original graph
      node_map_val : dictionary
          map between node types and the range of global node ids used
      edge_map_val : dictionary
          map between edge types and the range of global edge ids used
      ntypes_map : dictionary
          map between node type(string)  and node_type_id(int)
      etypes_map : dictionary
          map between edge type(string)  and edge_type_id(int)
      output_dir : string
          directory where the output files are to be stored
  
      Returns:
      --------
      dictionary
          map describing the graph information
  
      """
      part_metadata = {
          "graph_name": graph_name,
          "num_nodes": num_nodes,
          "num_edges": num_edges,
          "part_method": "metis",
          "num_parts": num_parts,
          "halo_hops": 1,
          "node_map": node_map_val,
          "edge_map": edge_map_val,
          "ntypes": ntypes_map,
          "etypes": etypes_map,
      }
  
      part_dir = "part" + str(part_id)
      node_feat_file = os.path.join(part_dir, "node_feat.dgl")
      edge_feat_file = os.path.join(part_dir, "edge_feat.dgl")
      part_graph_file = os.path.join(part_dir, "graph.dgl")
      part_metadata["part-{}".format(part_id)] = {
          "node_feats": node_feat_file,
          "edge_feats": edge_feat_file,
          "part_graph": part_graph_file,
      }
      return part_metadata
  
file_path: dgl/tools/distpartitioning/convert_partition.py
imports: import argparse
  import gc
  import json
  import logging
  import os
  import time
  import constants
  import dgl
  import numpy
  import pandas
  import pyarrow
  import torch
  from dgl.distributed.partition import _etype_str_to_tuple, _etype_tuple_to_str, RESERVED_FIELD_DTYPE
  from pyarrow import csv
  from utils import get_idranges, memory_snapshot, read_json
label_desc: Use image node_id 3 for calling a global function with example usage: create_metadata_json(graph_name, num_nodes, num_edges, part_id, num_parts, node_map_val, edge_map_val, ntypes_map, etypes_map, output_dir) and returns: part_metadata