class_docstr: FVQA Teacher, which loads the json VQA data and implements its own `act` method for
  interacting with student agent.
  
  Use "fvqa:split:X" to choose between splits 0-4 (inclusive), or just "fvqa" to use
  the default split (0).
code: def __init__(self, opt, shared=None):
      super().__init__(opt)
  
      dt = opt["datatype"].split(":")[0]
      if dt not in ("train", "test"):
          raise RuntimeError("Not valid datatype (only train/test).")
  
      task = opt.get("task", "fvqa:split:0")
      task_num = 0  # default to train/split 0
      split = task.split(":")
      if len(split) > 2:
          task_num = split[2]
          if task_num not in [str(i) for i in range(5)]:
              raise RuntimeError(
                  "Invalid train/test split ID (0-4 inclusive)"
              )
  
      if not hasattr(self, "factmetrics"):
          if shared and shared.get("factmetrics"):
              self.factmetrics = shared["factmetrics"]
          else:
              self.factmetrics = TeacherMetrics(
                  opt.get("metrics", "default")
              )
          self.datatype = opt["datatype"]
      questions_path, trainset_path, self.image_path = _path(opt)
  
      if shared and "ques" in shared:
          self.ques = shared["ques"]
      else:
          self._setup_data(questions_path, trainset_path, dt, task_num)
      self.len = len(self.ques)
  
      self.asked_question = False
      # for ordered data in batch mode (especially, for validation and
      # testing), each teacher in the batch gets a start index and a step
      # size so they all process disparate sets of the data
      self.step_size = opt.get("batchsize", 1)
      self.data_offset = opt.get("batchindex", 0)
      self.image_loader = ImageLoader(opt)
  
      self.reset()
  
imports: from parlai.core.image_featurizers import ImageLoader
  from parlai.core.metrics import TeacherMetrics
  from parlai.core.teachers import Teacher
  from parlai.utils.io import PathManager
  from .build import build
  import json
  import random
  import os
label_desc: Use image node_id 1 to create a new SplitTeacher object from inherited base classes: Teacher with example: obj = SplitTeacher(opt, shared)