class_docstr: Teacher for spoken two-person dialogues with labels being responses for the previous
  statement.
  
  The data is traversed twice (doubled), once for modelling USER replies and once for
  modelling ASSISTANT replies.
class_docstr_tok: ["Teacher","for","spoken","two-person","dialogues","with","labels","being","responses","for","the","previous","statement",".","The","data","is","traversed","twice","(","doubled",")",",","once","for","modelling","USER","replies","and","once","for","modelling","ASSISTANT","replies","."]
code: def __init__(self, opt, shared=None):
      opt["fn"] = "woz-dialogs.json"
      super().__init__(opt)
  
      if shared and "convos" in shared:
          # another instance was set up already, just reference its data
          self.convos = shared["convos"]
          self.episode_map = shared["episode_map"]
          self.ep_cheat_sheet = shared["ep_cheat_sheet"]
          self.num_ex = shared["num_ex"]
      else:
          # need to set up data from scratch
          self.ep_cheat_sheet = (
              {}
          )  # Stores imp. info. about each episode
  
          # Not all episodes have relevant examples for both USER and ASSISTANT
          # episode_map keeps track of which episode index is useful for which speaker
          # Need to do this otherwise might end up with a situation where we cannot
          # return anything in action
          self.episode_map = {}
          self.episode_map["U"] = {}
          self.episode_map["A"] = {}
          self.num_ex = 0
          data_path = tm_utils._path(opt)
          self._setup_data(data_path, opt)
  
      self.reset()
  
imports: from parlai.core.params import ParlaiParser
  import os
  import pandas
  from parlai.core.opt import Opt
  import parlai.core.tod.tod_core
  from typing import Optional
  from parlai.utils.data import DatatypeHelper
  from parlai.utils.io import PathManager
  import parlai.tasks.taskmaster.build
  import parlai.core.tod.tod_agents
  from parlai.core.teachers import FixedDialogTeacher
  from .None import tm_utils
  import json
label_desc: Use image node_id 1 to create a new WozDialogueTeacher object from inherited base classes: FixedDialogTeacher with example: obj = WozDialogueTeacher(opt, shared)