code: def get_task_config(task_config_templates, task_name, task_data_dir):
      task_config = task_config_templates[task_name].copy()
      task_config["paths"] = {}
      for key, rel_path in task_config["rel_paths"].items():
          if isinstance(rel_path, dict):
              raise RuntimeError(
                  "Nested path dicts not currently supported"
              )
          task_config["paths"][key] = os.path.join(
              task_data_dir, rel_path
          )
          assert os.path.exists(task_config["paths"][key])
      del task_config["rel_paths"]
      return task_config
  
file_path: jiant/jiant/proj/main/write_task_configs.py
imports: import os
  import jiant.utils.python.filesystem
  import jiant.utils.python.io
  import jiant.utils.zconf
label_desc: Use image node_id 1 for calling a global function with example usage: get_task_config(task_config_templates, task_name, task_data_dir) and returns: task_config