code: def download_task_data_and_write_config(
      task_name: str, task_data_path: str, task_config_path: str
  ):
      if task_name in SQUAD_TASKS:
          download_squad_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name in DIRECT_SUPERGLUE_TASKS_TO_DATA_URLS:
          download_superglue_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "abductive_nli":
          download_abductive_nli_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "arct":
          download_arct_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "fever_nli":
          download_fever_nli_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "swag":
          download_swag_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "qamr":
          download_qamr_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "qasrl":
          download_qasrl_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "newsqa":
          download_newsqa_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "mctaco":
          download_mctaco_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "mctest160":
          download_mctest160_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "mctest500":
          download_mctest500_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "mrqa_natural_questions":
          download_mrqa_natural_questions_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "mutual":
          download_mutual_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "mutual_plus":
          download_mutual_plus_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "piqa":
          download_piqa_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "winogrande":
          download_winogrande_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name == "ropes":
          download_ropes_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name in [
          "acceptability_definiteness",
          "acceptability_coord",
          "acceptability_eos",
          "acceptability_whwords",
      ]:
          download_acceptability_judgments_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      elif task_name in [
          "senteval_bigram_shift",
          "senteval_coordination_inversion",
          "senteval_obj_number",
          "senteval_odd_man_out",
          "senteval_past_present",
          "senteval_sentence_length",
          "senteval_subj_number",
          "senteval_top_constituents",
          "senteval_tree_depth",
          "senteval_word_content",
      ]:
          download_senteval_data_and_write_config(
              task_name=task_name,
              task_data_path=task_data_path,
              task_config_path=task_config_path,
          )
      else:
          raise KeyError(task_name)
  
imports: import json
  import logging
  import os
  import pandas
  import re
  import shutil
  import tarfile
  from operator import itemgetter
  from collections import Counter
  import jiant.scripts.download_data.utils
  import jiant.utils.display
  import jiant.utils.python.filesystem
  import jiant.utils.python.io
  from jiant.scripts.download_data.constants import SQUAD_TASKS, DIRECT_SUPERGLUE_TASKS_TO_DATA_URLS
label_desc: Use image node_id 1 for calling a global function with example usage: download_task_data_and_write_config(task_name, task_data_path, task_config_path) without return types