class_docstr: Arguments for loading base/pretrained or trained models.
docstr: Adds model-related arguments to an argparser.
code: def _add_parser_args(cls, parser):
      """Adds model-related arguments to an argparser."""
      model_group = parser.add_mutually_exclusive_group()
  
      model_names = list(HUGGINGFACE_MODELS.keys()) + list(
          TEXTATTACK_MODELS.keys()
      )
      model_group.add_argument(
          "--model",
          type=str,
          required=False,
          default=None,
          help="Name of or path to a pre-trained TextAttack model to load. Choices: "
          + str(model_names),
      )
      model_group.add_argument(
          "--model-from-file",
          type=str,
          required=False,
          help="File of model and tokenizer to import.",
      )
      model_group.add_argument(
          "--model-from-huggingface",
          type=str,
          required=False,
          help="Name of or path of pre-trained HuggingFace model to load.",
      )
  
      return parser
  
file_path: TextAttack/textattack/model_args.py
imports: from dataclasses import dataclass
  import json
  import os
  import transformers
  import textattack
  from textattack.shared.utils import ARGS_SPLIT_TOKEN, load_module_from_file
label_desc: Use image node_id 1 for calling the ModelArgs obj's underlying member method code with example usage: obj._add_parser_args(cls, parser) and returns: parser