class_docstr: This module provides access to data in the TOD conversations format.
  
  See core/tod.py for more info about the format.
docstr: Part of the code for loading worlds or scripts does a regex of "_" to "-" when
  loading agents.
  
  Not a great hack but suffices
code: def _get_right_file(self, filepath):
      """
      Part of the code for loading worlds or scripts does a regex of "_" to "-" when
      loading agents.
  
      Not a great hack but suffices
      """
      try:
          with open(filepath) as _:
              pass
          return filepath
      except FileNotFoundError:
          with open(filepath.replace("-", "_")) as _:
              return filepath.replace("-", "_")
      raise FileNotFoundError(
          f"Note: tod_json breaks if path contains mixed '-' and '_' in path, due to opt + agent loading wonkiness. Please try renaming the file. Filename: {filepath}"
      )
  
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 4 for calling the JsonTodParser obj's underlying member method code with example usage: obj._get_right_file(filepath) and returns: filepath, filepath