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 _build_prompt_and_exemplars(
      self, inner_separator: str, example_separator: str
  ) -> str:
      #### Set up our prompt and any exemplars we would like to use for the whole dataset
      prompt_and_examplars_raw = []
      if self.opt.get("use_task_prompt", True):
          prompt_and_examplars_raw.append(self.get_task_prompt())
      for idx in self.opt.get("exemplar_idx", []):
          (
              question,
              answer_prefix,
              answer,
              _,
          ) = self.question_answer_instance.get_question_answer(
              self.get_exemplar(idx)
          )
          exemplar = f"{question}{inner_separator}"
          if self.opt.get("include_reason", True):
              (
                  reason_prefix,
                  reason,
                  _,
              ) = self.reason_instance.get_full_reason_text(
                  self.get_exemplar(idx)
              )
              if self.opt.get("reason_before_answer", True):
                  exemplar += f"{reason_prefix}{reason}{inner_separator}{answer_prefix}{answer}"
              else:
                  exemplar += f"{answer_prefix}{answer}{inner_separator}{reason_prefix}{reason}"
          else:
              exemplar += f"{answer_prefix}{answer}"
          prompt_and_examplars_raw.append(exemplar)
      prompt_and_examplars = example_separator.join(
          prompt_and_examplars_raw
      )
      if len(prompt_and_examplars) > 0:
          prompt_and_examplars += example_separator
      return prompt_and_examplars
  
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 13 for calling the AbstractReasoningTeacher obj's underlying member method code with example usage: obj._build_prompt_and_exemplars(inner_separator, example_separator) and returns: prompt_and_examplars