code: def _path(opt, version, use_history):
      # Build the data if it doesn't exist.
      if version == "2009":
          assert use_history
          datapath = build_2009(opt["datapath"])
      elif version == "2018":
          datapath = build_2018(opt["datapath"], use_history)
      else:
          raise Exception(
              "Unknown version for OpenSubtitles: %s" % version
          )
      return os.path.join(
          datapath, opt["datatype"].split(":")[0] + ".txt"
      )
  
imports: from parlai.core.teachers import FbDeprecatedDialogTeacher
  from .build_2009 import build
  from .build_2018 import build
  import copy
  import os
label_desc: Use image node_id 1 for calling a global function with example usage: _path(opt, version, use_history) and returns: os