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 input JSON"
      )
      group.add_argument(
          "--json-keys",
          nargs="+",
          default=["text"],
          help="space separate listed of keys to extract from json",
      )
      group.add_argument(
          "--split-sentences",
          action="store_true",
          help="Split documents into sentences.",
      )
      group.add_argument(
          "--keep-newlines",
          action="store_true",
          help="Keep newlines between sentences when splitting.",
      )
  
      group = parser.add_argument_group(title="tokenizer")
      group.add_argument(
          "--tokenizer-type",
          type=str,
          required=True,
          choices=[
              "BertWordPieceLowerCase",
              "BertWordPieceCase",
              "GPT2BPETokenizer",
              "SentencePieceTokenizer",
              "GPTSentencePieceTokenizer",
              "Llama2Tokenizer",
              "NullTokenizer",
          ],
          help="What type of tokenizer to use.",
      )
      group.add_argument(
          "--tokenizer-model",
          type=str,
          default=None,
          help="YTTM tokenizer model.",
      )
      group.add_argument(
          "--vocab-file",
          type=str,
          default=None,
          help="Path to the vocab file",
      )
      group.add_argument(
          "--vocab-size",
          default=786,
          help="size of vocab for use with NullTokenizer",
      )
      group.add_argument(
          "--merge-file",
          type=str,
          default=None,
          help="Path to the BPE merge file (if necessary).",
      )
      group.add_argument(
          "--append-eod",
          action="store_true",
          help="Append an <eod> token to the end of a document.",
      )
      group.add_argument(
          "--lang",
          type=str,
          default="english",
          help="Language to use for NLTK-powered sentence splitting.",
      )
      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="runtime")
      group.add_argument(
          "--workers",
          type=int,
          required=True,
          help=(
              "Number of worker processes to launch."
              "A good default for fast pre-processing "
              "is: (workers * partitions) = available CPU cores."
          ),
      )
      group.add_argument(
          "--partitions",
          type=int,
          default=1,
          help="Number of file partitions",
      )
      group.add_argument(
          "--log-interval",
          type=int,
          default=1000,
          help="Interval between progress updates",
      )
      group.add_argument(
          "--keep-sequential-samples",
          action="store_true",
          help="Ensure ordering of samples in .jsonl files is "
          "preserved when using partitions>1.",
      )
      args = parser.parse_args()
      args.keep_empty = False
  
      if (
          args.tokenizer_type.lower().startswith("bert")
          and not args.split_sentences
      ):
          print("Are you sure you don't want to split sentences?")
  
      # some default/dummy values for the tokenizer
      args.rank = 1
      args.make_vocab_size_divisible_by = 128
      args.tensor_model_parallel_size = 1
      args.vocab_extra_ids = 0
  
      return args
  
imports: import argparse
  import math
  import json
  import os
  import sys
  import time
  import gzip
  import glob
  import torch
  import numpy
  import multiprocessing
  from megatron.tokenizer import build_tokenizer
  from megatron.core.datasets import indexed_dataset
label_desc: Use image node_id 1 for calling a global function with example usage: get_args() and returns: args