code: def main():
      parser = argparse.ArgumentParser(
          description="Dispatch edge index and data to partitions",
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
  
      parser.add_argument(
          "--in-dir",
          type=str,
          help="Location of the input directory where the dataset is located",
      )
      parser.add_argument(
          "--metadata-filename",
          type=str,
          default="metadata.json",
          help="Filename for the metadata JSON file that describes the dataset to be dispatched.",
      )
      parser.add_argument(
          "--partitions-dir",
          type=str,
          help="Location of the partition-id mapping files which define node-ids and their respective partition-ids, relative to the input directory",
      )
      parser.add_argument(
          "--out-dir",
          type=str,
          help="Location of the output directory where the graph partitions will be created by this pipeline",
      )
      parser.add_argument(
          "--ip-config",
          type=str,
          help="File location of IP configuration for server processes",
      )
      parser.add_argument(
          "--master-port",
          type=int,
          default=12345,
          help="port used by gloo group to create randezvous point",
      )
      parser.add_argument(
          "--log-level",
          required=False,
          type=str,
          help="Log level to use for execution.",
          default="INFO",
          choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
      )
      parser.add_argument(
          "--python-path",
          type=str,
          default=sys.executable,
          help="Path to the Python executable on all workers",
      )
      parser.add_argument(
          "--ssh-port", type=int, default=22, help="SSH Port."
      )
      parser.add_argument(
          "--process-group-timeout",
          type=int,
          default=1800,
          help="timeout[seconds] for operations executed against the process group",
      )
      parser.add_argument(
          "--save-orig-nids",
          action="store_true",
          help="Save original node IDs into files",
      )
      parser.add_argument(
          "--save-orig-eids",
          action="store_true",
          help="Save original edge IDs into files",
      )
      parser.add_argument(
          "--graph-formats",
          type=str,
          default=None,
          help="Save partitions in specified formats. It could be any combination(joined with ``,``) "
          "of ``coo``, ``csc`` and ``csr``. If not specified, save one format only according to "
          "what format is available. If multiple formats are available, selection priority "
          "from high to low is ``coo``, ``csc``, ``csr``.",
      )
  
      args, _ = parser.parse_known_args()
  
      fmt = "%(asctime)s %(levelname)s %(message)s"
      logging.basicConfig(
          format=fmt,
          level=getattr(logging, args.log_level, None),
      )
  
      assert os.path.isdir(args.in_dir)
      assert os.path.isdir(args.partitions_dir)
      assert os.path.isfile(args.ip_config)
      assert isinstance(args.master_port, int)
  
      submit_jobs(args)
  
file_path: dgl/tools/dispatch_data.py
imports: import argparse
  import json
  import logging
  import os
  import sys
  from partition_algo.base import load_partition_meta
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types