code: def create_task_specific_configs(
      task_specific_configs_dict,
  ) -> Dict[str, TaskSpecificConfig]:
      """Takes task-specific configs, returns them as TaskSpecificConfig(s).
  
      Args:
          task_specific_configs_dict: map task name to map of task-specific config name to value.
  
      Raises:
          TypeError if task-specific config is not either a dict or a TaskSpecificConfig object.
  
      Returns:
          Dict[str, TaskSpecificConfig] map of task name to task-specific configs.
  
      """
      task_specific_configs = {}
      for k, v in task_specific_configs_dict.items():
          if isinstance(v, dict):
              v = TaskSpecificConfig.from_dict(v)
          elif isinstance(v, TaskSpecificConfig):
              pass
          else:
              raise TypeError(type(v))
          task_specific_configs[k] = v
      return task_specific_configs
  
imports: import warnings
  from dataclasses import dataclass
  from typing import Dict, List, Optional
  import jiant.proj.main.components.task_sampler
  import jiant.shared.caching
  from jiant.tasks.core import Task
  from jiant.tasks.retrieval import create_task_from_config_path
  import jiant.utils.python.io
  from jiant.utils.python.datastructures import ExtendedDataClassMixin
label_desc: Use image node_id 4 for calling a global function with example usage: create_task_specific_configs(task_specific_configs_dict) and returns: task_specific_configs