code: def dump_partition_meta(part_meta, meta_file):
      """Dump partition metadata into json file.
  
      Parameters
      ----------
      part_meta : PartitionMeta
          The partition metadata.
      meta_file : str
          The target file to save data.
      """
      with open(meta_file, "w") as f:
          json.dump(part_meta.dict(), f, sort_keys=True, indent=4)
  
file_path: dgl/tools/partition_algo/base.py
imports: import json
  from typing import Optional
  import pydantic
  from dgl import DGLError
label_desc: Use image node_id 1 for calling a global function with example usage: dump_partition_meta(part_meta, meta_file) without return types