code: def generate_configs(args: RunConfiguration):
      xtreme_task = args.xtreme_task
      if xtreme_task == "mlqa":
          xtreme_task_name_list = [
              f"{xtreme_task}_{lang}_{lang}"
              for lang in LANGS_DICT[xtreme_task]
          ]
      else:
          xtreme_task_name_list = [
              f"{xtreme_task}_{lang}"
              for lang in LANGS_DICT[xtreme_task]
          ]
  
      if xtreme_task in TRAINED_TASKS:
          train_task = TRAIN_TASK_DICT[xtreme_task]
          train_task_name_list = [train_task]
          val_task_name_list = get_unique_list_in_order(
              [xtreme_task_name_list, train_task_name_list]
          )
          if args.early_stop_on_xtreme_tasks:
              train_val_task_name_list = val_task_name_list
          else:
              train_val_task_name_list = train_task_name_list
      elif xtreme_task in UNTRAINED_TASKS:
          train_task_name_list = []
          val_task_name_list = xtreme_task_name_list
          train_val_task_name_list = []
      else:
          raise KeyError(xtreme_task)
  
      if xtreme_task == "udpos":
          test_task_name_list = xtreme_task_name_list + [
              f"udpos_{lang}" for lang in EXTRA_UDPOS_TEST_LANGS
          ]
      elif xtreme_task in ["xquad", "tydiqa", "tatoeba"]:
          test_task_name_list = []
      else:
          test_task_name_list = xtreme_task_name_list
  
      if not args.suppress_print:
          print("Training on:", ", ".join(train_task_name_list))
          print("Validation on:", ", ".join(val_task_name_list))
          print(
              "Early stopping on:", ", ".join(train_val_task_name_list)
          )
          print("Testing on:", ",".join(test_task_name_list))
  
      config = configurator.SimpleAPIMultiTaskConfigurator(
          task_config_base_path=args.task_config_base_path,
          task_cache_base_path=args.task_cache_base_path,
          train_task_name_list=train_task_name_list,
          train_val_task_name_list=train_val_task_name_list,
          val_task_name_list=val_task_name_list,
          test_task_name_list=test_task_name_list,
          epochs=args.epochs,
          train_batch_size=args.train_batch_size,
          eval_batch_multiplier=args.eval_batch_multiplier,
          gradient_accumulation_steps=args.gradient_accumulation_steps,
          eval_subset_num=args.eval_subset_num,
          num_gpus=args.num_gpus,
          warmup_steps_proportion=args.warmup_steps_proportion,
      ).create_config()
  
      # Make sure all tasks use the same task head
      config["taskmodels_config"]["task_to_taskmodel_map"] = {
          k: xtreme_task
          for k, v in config["taskmodels_config"][
              "task_to_taskmodel_map"
          ].items()
      }
      if not args.suppress_print:
          print(f"Assigning all tasks to '{xtreme_task}' head")
      if xtreme_task in UNTRAINED_TASKS:
          # The reference implementation from the XTREME paper uses layer 14 for the
          #  retrieval representation.
          config["taskmodels_config"]["taskmodel_config_map"] = {
              xtreme_task: {
                  "pooler_type": "mean",
                  "layer": args.retrieval_layer,
              }
          }
  
      py_io.write_json(config, args.output_path)
  
imports: import jiant.proj.main.scripts.configurator
  import jiant.utils.zconf
  import jiant.utils.python.io
  from jiant.utils.python.datastructures import get_unique_list_in_order
label_desc: Use image node_id 1 for calling a global function with example usage: generate_configs(args) without return types