code: def add_global_adapter_cfg(model, global_adapter_cfg):
      # Convert to DictConfig from dict or Dataclass
      if is_dataclass(global_adapter_cfg):
          global_adapter_cfg = OmegaConf.structured(global_adapter_cfg)
  
      if not isinstance(global_adapter_cfg, DictConfig):
          global_adapter_cfg = DictConfig(global_adapter_cfg)
  
      # Update the model.cfg with information about the new adapter global cfg
      with open_dict(global_adapter_cfg), open_dict(model.cfg):
          if "adapters" not in model.cfg:
              model.cfg.adapters = OmegaConf.create({})
  
          # Add the global config for adapters to the model's internal config
          model.cfg.adapters[
              model.adapter_global_cfg_key
          ] = global_adapter_cfg
  
          # Update all adapter modules (that already exist) with this global adapter config
          model.update_adapter_cfg(model.cfg.adapters)
  
file_path: NeMo/examples/tts/fastpitch_finetune_adapters.py
imports: import os
  from dataclasses import is_dataclass
  import pytorch_lightning
  from omegaconf import DictConfig, OmegaConf, open_dict
  from nemo.collections.common.callbacks import LogEpochTimeCallback
  from nemo.collections.tts.models import FastPitchModel
  from nemo.core import adapter_mixins
  from nemo.core.config import hydra_runner
  from nemo.utils import logging
  from nemo.utils.exp_manager import exp_manager
label_desc: Use image node_id 2 for calling a global function with example usage: add_global_adapter_cfg(model, global_adapter_cfg) without return types