code: def _get_task_suite(args: argparse.Namespace) -> TaskSuite:
      available_tasks = TaskSuite.list_available()
      if args.task in available_tasks:
          suite_name = args.task
      else:
          raise ConfigurationError(
              f"'{args.task}' is not a recognized task suite. "
              f"Available tasks are: {available_tasks}."
          )
  
      file_path = args.checklist_suite
  
      task_suite_args = args.task_suite_args.strip()
      if len(task_suite_args) <= 0:
          task_suite_args = {}
      else:
          task_suite_args = json.loads(task_suite_args)
  
      return TaskSuite.constructor(
          name=suite_name,
          suite_file=file_path,
          extra_args=task_suite_args,
      )
  
file_path: allennlp/allennlp/commands/_checklist_internal.py
imports: from typing import Optional, Dict, Any, List
  import argparse
  import sys
  import json
  import logging
  from allennlp.commands.subcommand import Subcommand
  from allennlp.common.checks import check_for_gpu, ConfigurationError
  from allennlp.models.archival import load_archive
  from allennlp.predictors.predictor import Predictor
label_desc: Use image node_id 2 for calling a global function with example usage: _get_task_suite(args) and returns: TaskSuite