code: def add_and_parse_args() -> argparse.Namespace:
      parser = argparse.ArgumentParser(
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
      parser.add_argument(
          "--src-root-dir",
          type=pathlib.Path,
          required=True,
          help="path to root directory under which source datasets are saved",
      )
      parser.add_argument(
          "--save-dir",
          type=pathlib.Path,
          required=False,
          help="path to directory under which target artifacts will be saved",
      )
      parser.add_argument(
          "--min-text-len",
          type=int,
          default=20,
          help="minimum number of alphanumeric characters in a text "
          "for it to be included in the training dataset",
      )
      parser.add_argument(
          "--min-obs",
          type=int,
          default=1_000,
          help="minimum number of observations -- (text, lang) pairs -- in a language "
          "for it to be included in the training dataset",
      )
      parser.add_argument(
          "--test-size",
          type=float,
          default=0.2,
          help="fraction of data observations to set aside for the test set",
      )
      parser.add_argument(
          "--seed",
          type=int,
          default=None,
          help="seed number used to make random operations deterministic, for reproducibility",
      )
      parser.add_argument(
          "--force",
          action="store_true",
          default=False,
          help="if specified, force downloads of all datasets, "
          "even if they already exist on disk under ``src_root_dir``",
      )
      return parser.parse_args()
  
imports: import argparse
  import collections
  import logging
  import operator
  import pathlib
  import random
  import statistics
  from functools import partial
  from typing import Optional
  import sklearn.model_selection
  from toolz import itertoolz
  import textacy.datasets
  import textacy.io
  import textacy.lang_id._datasets
  import textacy.preprocessing
label_desc: Use image node_id 3 for calling a global function with example usage: add_and_parse_args() and returns: parser