class_docstr: This module provides access to data in the TOD conversations format.
  
  See core/tod.py for more info about the format.
code: def __init__(self, opt, shared=None):
      if not opt.get("jsonfile_datapath"):
          raise RuntimeError("jsonfile_datapath not specified")
      if not hasattr(self, "opt"):
          self.opt = opt
      self.opt["datafile"] = opt["jsonfile_datapath"]
      self.fold = self.opt["datatype"]  # don't care
      # Truncate datafile to just the immediate enclosing folder name and file name
      dirname, basename = os.path.split(self.opt["datafile"])
      self.id = os.path.join(os.path.split(dirname)[1], basename)
      super().__init__(opt, shared)
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.utils.data import DatatypeHelper
  import parlai.core.tod.tod_agents
  import parlai.core.tod.tod_core
  import json
  import os
label_desc: Use image node_id 2 to create a new JsonTodParser object from inherited base classes: tod_agents with example: obj = JsonTodParser(opt, shared)