code: def instance_config_from_config_dict(
      config: Dict[str, Any]
  ) -> InstanceConfig:
      cloud = config.get("cloud", "gcp")
      if cloud == "azure":
          return AzureSlimInstanceConfig.from_dict(config)
      assert cloud == "gcp"
      return GCPSlimInstanceConfig.from_dict(config)
  
file_path: hail/batch/batch/cloud/utils.py
imports: import os
  from typing import Any, Dict, Set
  from gear.cloud_config import get_azure_config, get_gcp_config
  from hailtop.aiocloud.aioazure import AzureAsyncFS
  from hailtop.aiocloud.aiogoogle import GoogleStorageAsyncFS
  from ..instance_config import InstanceConfig
  from .azure.instance_config import AzureSlimInstanceConfig
  from .gcp.instance_config import GCPSlimInstanceConfig
label_desc: Use image node_id 1 for calling a global function with example usage: instance_config_from_config_dict(config) and returns: GCPSlimInstanceConfig, AzureSlimInstanceConfig