class_docstr: Arguments for loading dataset from command line input.
class_docstr_tok: ["Arguments","for","loading","dataset","from","command","line","input","."]
docstr: Adds dataset-related arguments to an argparser.
docstr_tok: ["Adds","dataset-related","arguments","to","an","argparser","."]
code: def _add_parser_args(cls, parser):
      """Adds dataset-related arguments to an argparser."""
  
      dataset_group = parser.add_mutually_exclusive_group()
      dataset_group.add_argument(
          "--dataset-by-model",
          type=str,
          required=False,
          default=None,
          help="Dataset to load depending on the name of the model",
      )
      dataset_group.add_argument(
          "--dataset-from-huggingface",
          type=str,
          required=False,
          default=None,
          help="Dataset to load from `datasets` repository.",
      )
      dataset_group.add_argument(
          "--dataset-from-file",
          type=str,
          required=False,
          default=None,
          help="Dataset to load from a file.",
      )
      parser.add_argument(
          "--dataset-split",
          type=str,
          required=False,
          default=None,
          help="Split of dataset to use when specifying --dataset-by-model or --dataset-from-huggingface.",
      )
      parser.add_argument(
          "--filter-by-labels",
          nargs="+",
          type=int,
          required=False,
          default=None,
          help="List of labels to keep in the dataset and discard all others.",
      )
      return parser
  
imports: from dataclasses import dataclass
  import textattack
  from textattack.shared.utils import ARGS_SPLIT_TOKEN, load_module_from_file
label_desc: Use image node_id 1 for calling the DatasetArgs obj's underlying member method code with example usage: obj._add_parser_args(cls, parser) and returns: parser