code: def get_args():
      parser = argparse.ArgumentParser()
  
      group = parser.add_argument_group(title="input data")
      group.add_argument(
          "--input",
          type=str,
          required=True,
          help="Path to directory containing all document files to merge",
      )
  
      group = parser.add_argument_group(title="output data")
      group.add_argument(
          "--output-prefix",
          type=str,
          required=True,
          help="Path to binary output file without suffix",
      )
  
      group = parser.add_argument_group(title="miscellaneous")
      group.add_argument(
          "--multimodal",
          action="store_true",
          help="Whether the datasets are assumed to be multimodal",
      )
  
      args = parser.parse_args()
  
      assert os.path.isdir(
          args.input
      ), f"ERROR: {args.input} is not a directory or does not exist"
  
      assert os.path.isdir(
          os.path.dirname(args.output_prefix)
      ), f"ERROR: {os.path.dirname(args.output_prefix)} is not a directory or does not exist"
  
      return args
  
imports: import os
  import sys
  import json
  import argparse
  from megatron.core.datasets.indexed_dataset import MMapIndexedDataset, MMapIndexedDatasetBuilder, get_bin_path, get_idx_path
label_desc: Use image node_id 1 for calling a global function with example usage: get_args() and returns: args