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 _preload_data(self, fold) -> List[Message]:
      example_separator = self.opt.get("example_separator_token")
      inner_separator = self.opt.get("inner_separator_token")
  
      prompt_and_examplars = self._build_prompt_and_exemplars(
          inner_separator,
          example_separator,
      )
  
      all_messages = []
      try:
          print("Pre-loading data...")
          batch = []
          for example in tqdm(list(self.get_data_for_fold(fold))):
              batch.append(example)
              if len(batch) >= self.opt["preload_batch_size"]:
                  all_messages.extend(
                      self._load_data_batch(
                          batch,
                          prompt_and_examplars,
                          inner_separator,
                      )
                  )
                  batch = []
          if len(batch) > 0:
              all_messages.extend(
                  self._load_data_batch(
                      batch,
                      prompt_and_examplars,
                      inner_separator,
                  )
              )
      finally:
          self.reason_instance.save_cache()
  
      return all_messages
  
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 11 for calling the AbstractReasoningTeacher obj's underlying member method code with example usage: obj._preload_data(fold) and returns: all_messages