code: def _path(opt):
      build(opt)
  
      dt = opt["datatype"].split(":")[0]
  
      if dt == "train":
          prefix = "train"
      # Using matched set as valid and mismatched set as test
      elif dt == "valid":
          prefix = "dev"
      elif dt == "test":
          prefix = "test"
      else:
          raise RuntimeError("Not valid datatype.")
  
      data_path = os.path.join(
          opt["datapath"], AQUA, AQUA, prefix + ".tok.json"
      )
  
      return data_path
  
imports: import random
  from typing import Optional
  from parlai.tasks.reasoning.agents import MWPStepsReasoningTeacher
  from parlai.tasks.reasoning.base import AbstractQuestionAnswer, AbstractReason, AbstractReasoningTeacher
  from parlai.tasks.reasoning.question_answer import MultipleChoiceQuestionAnswer
  from parlai.tasks.reasoning.reason_types.step_by_step import StepByStepReason
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.teachers import DialogTeacher
  from parlai.utils.io import PathManager
  from parlai.tasks.aqua.build import build
  import os
  import copy
  import json
label_desc: Use image node_id 1 for calling a global function with example usage: _path(opt) and returns: data_path