class_docstr: This module provides access to data in the Conversations format.
  
  See core/teachers.py for more info about the format.
class_docstr_tok: ["This","module","provides","access","to","data","in","the","Conversations","format",".","See","core\/teachers.py","for","more","info","about","the","format","."]
code: def __init__(self, opt, shared=None):
      opt = copy.deepcopy(opt)
      if not opt.get("jsonfile_datapath"):
          raise RuntimeError("jsonfile_datapath not specified")
      datafile = opt["jsonfile_datapath"]
      if opt["jsonfile_datatype_extension"]:
          datafile += "_" + opt["datatype"].split(":")[0] + ".jsonl"
      opt["conversationteacher_datafile"] = datafile
      super().__init__(opt, shared)
  
      # Truncate datafile to just the immediate enclosing folder name and file name
      dirname, basename = os.path.split(datafile)
      self.id = os.path.join(os.path.split(dirname)[1], basename)
  
file_path: ParlAI/parlai/tasks/jsonfile/agents.py
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  import copy
  import os
  from parlai.core.teachers import ConversationTeacher
label_desc: Use image node_id 2 to create a new JsonTeacher object from inherited base classes: ConversationTeacher with example: obj = JsonTeacher(opt, shared)