code: def _path(opt, test_type):
      build(opt)
  
      dt = opt["datatype"].split(":")[0]
  
      if dt == "train":
          suffix = "train"
      elif dt == "valid":
          suffix = "dev"
      elif dt == "test":
          if test_type == "vanilla":
              suffix = "test"
          else:
              suffix = test_type  # human-bot, act, or rct
      else:
          raise RuntimeError("Not valid datatype.")
  
      data_directory = os.path.join(
          opt["datapath"], DECODE, DECODE_PREFIX + DECODE_FOLDER_VERSION
      )
  
      data_path = os.path.join(data_directory, suffix + ".jsonl")
  
      return data_path
  
file_path: ParlAI/parlai/tasks/decode/agents.py
imports: import copy
  import json
  import os
  from parlai.utils.io import PathManager
  from parlai.core.teachers import DialogTeacher
  from .build import build, DECODE, DECODE_PREFIX, DECODE_FOLDER_VERSION
label_desc: Use image node_id 1 for calling a global function with example usage: _path(opt, test_type) and returns: data_path