code: def _prepare_default_adapter_config(
      *, global_key: str, meta_key: str, cfg: DictConfig = None
  ) -> DictConfig:
      if cfg is None:
          cfg = OmegaConf.create({})
  
      with open_dict(cfg):
          if global_key not in cfg:
              cfg[global_key] = OmegaConf.create({})
  
          if meta_key not in cfg[global_key]:
              cfg[global_key][meta_key] = OmegaConf.create({})
  
          if "modules" not in cfg[global_key][meta_key]:
              cfg[global_key][meta_key]["modules"] = OmegaConf.create(
                  {}
              )
  
      return cfg
  
imports: import inspect
  from abc import ABC
  from dataclasses import dataclass, is_dataclass
  from typing import List, Optional, Set, Tuple, Union
  import torch
  import torch.nn
  from hydra.utils import instantiate
  from omegaconf import DictConfig, OmegaConf, open_dict
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 3 for calling a global function with example usage: _prepare_default_adapter_config() and returns: cfg