class_docstr: Teacher that builds up Message objects based on child `question and answer` and
  `reason` classes.
  
  Also handles making exemplars.
class_docstr_tok: ["Teacher","that","builds","up","Message","objects","based","on","child","`","question","and","answer","`","and","`","reason","`","classes",".","Also","handles","making","exemplars","."]
code: def add_cmdline_args(
      cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
  ) -> ParlaiParser:
      super().add_cmdline_args(parser, partial_opt=partial_opt)
      group = parser.add_argument_group(
          "Abstract Reasoning Teacher args"
      )
      #####
      # Token options
      #####
      group.add_argument(
          "--inner-separator-token",
          type=str,
          default="\t",
          help="Token that we use to separate components within an example. Intentially the same"
          + "as in AbstractReason and AbstractQuestionAnswer",
      )
      group.add_argument(
          "--example-separator-token",
          type=str,
          default="\n",
          help="Token that we use to separate different examples. Set to '\\n' as a default since"
          + "some agents (ex. GPTZ) will use '\\n' as a way to separate turns",
      )
      #####
      # Options for combining/including reasons with questions/answers
      #####
      group.add_argument(
          "--include-reason",
          type=bool,
          default=True,
          help="Should we include the reason as part of the generation/exemplars?",
      )
      group.add_argument(
          "--reason-before-answer",
          type=bool,
          default=True,
          help="When we include a reason, should it come before or after the answer? Useful for"
          + "designating pre-hoc vs post-hoc justification",
      )
      group.add_argument(
          "--initial-generation-target",
          type=str,
          choices=["reason", "answer", "other"],
          default="reason",
          help="If we are not including the reason, this does nothing and goes with assuming `answer`"
          + "is the target since that is the only option. This, in conjunction with `--reason-before-answer`"
          + "determines what is included in the input vs the output; we will construct the input/output"
          + "appropriately based on these two flags if `reason` or `answer` is selected. If 'other' is selected,"
          + "`self.make_custom_input_text_label()` will be called. (Last of these most useful for if we"
          + "want to do say, step-by-step reasoning",
      )
      group.add_argument(
          "--include-generation-target-token-in-input",
          type=bool,
          default=True,
          help="Sometimes we want to include the token representing the reason or the answer at the end"
          + "of our input, since this can help prime the model to do the correct generation",
      )
      #####
      # Options for task prompts + exemplars
      #####
      group.add_argument(
          "--use-task-prompt",
          type=bool,
          default=True,
          help="Use the prompt from `get_task_prompt()` before all reasons, questions, and answers",
      )
      group.add_argument(
          "--task-prompt",
          type=str,
          default="",
          help="`get_task_prompt()` looks at this by default. Child classes can override this value.",
      )
      group.add_argument(
          "--exemplar-idx",
          type=int,
          nargs="*",
          default=[],
          help="IDX of exemplars to use. Looks data up from a `self.exemplars_raw` field that should be"
          + "set in `__init__()`. NOTE: Including this in the base class as a convenience; individual"
          + "datasets may find it useful to have their own `--<dataset name>-exemplar-idx` arguments for"
          + "multitasking, since this will be shared across tasks",
      )
      #####
      # Data loading
      #####
      group.add_argument(
          "--preload-batch-size",
          type=int,
          default=1,
          help=(
              "If greater than 1, data will be preloaded in batches of this size. This is useful when "
              "data loading involves an expensive operation, e.g. paraphrase perturbation."
          ),
      )
      group.add_argument(
          "--skip-perturbation-failures",
          type=bool,
          default=False,
          help=(
              "Some chains can not be perturbes for certain perturbation types. Set this flag to return "
              "only perturbed chains and drop non-perturbed examples"
          ),
      )
  
      parser = cls.get_reason_class().add_cmdline_args(
          parser, partial_opt
      )
      parser = cls.get_question_answer_class().add_cmdline_args(
          parser, partial_opt
      )
  
      return parser
  
imports: from parlai.core.opt import Opt
  from parlai.core.message import Message
  from parlai.core.params import ParlaiParser
  from parlai.core.teachers import DialogTeacher
  from tqdm import tqdm
  from typing import Any, Dict, Iterable, List, Optional, Tuple
label_desc: Use image node_id 1 for calling the AbstractReasoningTeacher obj's underlying member method code with example usage: obj.add_cmdline_args(cls, parser, partial_opt) and returns: parser