class_docstr: Used inside of an `AbstractReasoningTeacher` to define how the "Question" and
  "Answer" part of an example should be serialized out to a string, given a dict
  object that includes all necessary information for the example.
  
  The Question includes all context (ex. input background) necessary to generate the
  Answer. This class is responsible for handling its own tokenization.
class_docstr_tok: ["Used","inside","of","an","`","AbstractReasoningTeacher","`","to","define","how","the","``","Question","''","and","''","Answer","''","part","of","an","example","should","be","serialized","out","to","a","string",",","given","a","dict","object","that","includes","all","necessary","information","for","the","example",".","The","Question","includes","all","context","(","ex",".","input","background",")","necessary","to","generate","the","Answer",".","This","class","is","responsible","for","handling","its","own","tokenization","."]
docstr: Given a dict object that includes all of the information necessary for an
  example, serialize Question and Answer strings that will be used to construct
  the `text` object in a ParlAI Teacher Message. Called from `setup_data()` in
  `AbstractReasoningTeacher`.
  
  For example, the 'question text' for a multiple choice version of this class may include different
  presentation of prefixes to different answer choices (ex. a,b,c vs 1,2,3). Depending on external flags,
  the `answer prefix token` may be a straightforward "ANSWER:" or it may be something like "CHOICE:";
  the `answer text` itself may be the answer itself or the prefix, etc.
  
  Output is:
  
      str - question text (Including any structured prefix token)
      str - answer prefix token
      str - answer text
      Dict - any metadata to append to the final Message object
  
  We return the `answer prefix token` as a string out of this function in case we want to prompt the
  message with it as the last line of the input, rather than as the first part of the label.
docstr_tok: ["Given","a","dict","object","that","includes","all","of","the","information","necessary","for","an","example",",","serialize","Question","and","Answer","strings","that","will","be","used","to","construct","the","`","text","`","object","in","a","ParlAI","Teacher","Message",".","Called","from","`","setup_data","(",")","`","in","`","AbstractReasoningTeacher","`",".","For","example",",","the","'question","text","'","for","a","multiple","choice","version","of","this","class","may","include","different","presentation","of","prefixes","to","different","answer","choices","(","ex",".","a",",","b",",","c","vs","1,2,3",")",".","Depending","on","external","flags",",","the","`","answer","prefix","token","`","may","be","a","straightforward","``","ANSWER",":","''","or","it","may","be","something","like","``","CHOICE",":","''",";","the","`","answer","text","`","itself","may","be","the","answer","itself","or","the","prefix",",","etc",".","Output","is",":","str","-","question","text","(","Including","any","structured","prefix","token",")","str","-","answer","prefix","token","str","-","answer","text","Dict","-","any","metadata","to","append","to","the","final","Message","object","We","return","the","`","answer","prefix","token","`","as","a","string","out","of","this","function","in","case","we","want","to","prompt","the","message","with","it","as","the","last","line","of","the","input",",","rather","than","as","the","first","part","of","the","label","."]
code: def get_question_answer(
      self, example_dict: Dict
  ) -> Tuple[t_QUESTION, t_ANSWER_PREFIX_TOKEN, t_ANSWER, Dict]:
      """
      Given a dict object that includes all of the information necessary for an
      example, serialize Question and Answer strings that will be used to construct
      the `text` object in a ParlAI Teacher Message. Called from `setup_data()` in
      `AbstractReasoningTeacher`.
  
      For example, the 'question text' for a multiple choice version of this class may include different
      presentation of prefixes to different answer choices (ex. a,b,c vs 1,2,3). Depending on external flags,
      the `answer prefix token` may be a straightforward "ANSWER:" or it may be something like "CHOICE:";
      the `answer text` itself may be the answer itself or the prefix, etc.
  
      Output is:
  
          str - question text (Including any structured prefix token)
          str - answer prefix token
          str - answer text
          Dict - any metadata to append to the final Message object
  
      We return the `answer prefix token` as a string out of this function in case we want to prompt the
      message with it as the last line of the input, rather than as the first part of the label.
      """
      raise NotImplementedError("Derived class must implement")
  
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 3 for calling the AbstractQuestionAnswer obj's underlying member method code with example usage: obj.get_question_answer(example_dict) without return types