class_docstr: Hand-written SQuAD teacher, which loads the json squad data and implements its own
  `act()` method for interacting with student agent, rather than inheriting from the
  core Dialog Teacher. This code is here as an example of rolling your own without
  inheritance.
  
  This teacher also provides access to the "answer_start" indices that specify the
  location of the answer in the context.
class_docstr_tok: ["Hand-written","SQuAD","teacher",",","which","loads","the","json","squad","data","and","implements","its","own","`","act","(",")","`","method","for","interacting","with","student","agent",",","rather","than","inheriting","from","the","core","Dialog","Teacher",".","This","code","is","here","as","an","example","of","rolling","your","own","without","inheritance",".","This","teacher","also","provides","access","to","the","``","answer_start","''","indices","that","specify","the","location","of","the","answer","in","the","context","."]
code: def __init__(self, opt, shared=None):
      build(opt)
      super().__init__(opt, shared)
  
      if self.datatype.startswith("train"):
          suffix = "train"
      else:
          suffix = "dev"
      datapath = os.path.join(
          opt["datapath"], "SQuAD", suffix + "-v1.1.json"
      )
      self.data = self._setup_data(datapath)
  
      self.id = "squad"
      self.reset()
  
imports: import copy
  import json
  import os
  from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.message import Message
  from parlai.core.opt import Opt
  from parlai.core.teachers import FixedDialogTeacher, DialogTeacher, ParlAIDialogTeacher
  from parlai.tasks.wrapper.agents import AbstractWrapperTeacher
  from parlai.utils.io import PathManager
  from .build import build
label_desc: Use image node_id 1 to create a new IndexTeacher object from inherited base classes: FixedDialogTeacher with example: obj = IndexTeacher(opt, shared)