code: def _path(opt, task_size="small"):
      """Return path to json file of dataset - it can be train/valid file
      of small/large dataset. Validation data is used for test as well,
      because labels are inferred from the image and task itself.
      """
      dt = opt["datatype"].split(":")[0]
      # ensure data is built
      build(opt)
      if dt == "train":
          file_name = "train.json"
      elif dt == "valid" or dt == "test":
          file_name = "valid.json"
      else:
          raise RuntimeError("Not valid datatype.")
  
      data_path = os.path.join(
          opt["datapath"], "taskntalk", task_size, file_name
      )
      return data_path
  
imports: from parlai.core.teachers import Teacher
  from parlai.utils.io import PathManager
  from .build import build
  import json
  import os
  import random
label_desc: Use image node_id 1 for calling a global function with example usage: _path(opt, task_size) and returns: data_path