code: def build_full_config(
      adapter_config, model_config, save_id2label=False, **kwargs
  ):
      config_dict = {
          "model_type": model_config.model_type,
          # some models such as encoder-decoder don't have a model-wide hidden size
          "hidden_size": getattr(model_config, "hidden_size", None),
      }
      config_dict.update(kwargs)
      if (
          not hasattr(model_config, "prediction_heads")
          and save_id2label
      ):
          config_dict["label2id"] = model_config.label2id
      if isinstance(adapter_config, AdapterConfig):
          config_dict["config"] = adapter_config.to_dict()
      else:
          config_dict["config"] = adapter_config
      config_dict["version"] = __version__
      return config_dict
  
imports: import copy
  import logging
  from collections.abc import Collection, Mapping
  from typing import List, Optional, Union
  from ..None import __version__
  from ..composition import AdapterCompositionBlock
  from ..utils import get_adapter_config_hash
  from .adapter_config import ADAPTER_CONFIG_MAP, DEFAULT_ADAPTER_CONFIG, AdapterConfig, ConfigUnion
  from .adapter_fusion_config import ADAPTERFUSION_CONFIG_MAP, DEFAULT_ADAPTERFUSION_CONFIG
label_desc: Use image node_id 1 for calling a global function with example usage: build_full_config(adapter_config, model_config, save_id2label) and returns: config_dict