code: def get_adapter_cfg(
      in_features=50, dim=100, norm_pos="pre", atype="linear", **kwargs
  ):
      valid_types = ["linear", "mha", "relmha"]
      if atype not in valid_types:
          raise ValueError(f"Invalid type. Valid types = {atype}")
  
      if atype == "linear":
          cfg = adapter_modules.LinearAdapterConfig(
              in_features=in_features, dim=dim, norm_position=norm_pos
          )
      elif atype == "mha":
          cfg = multi_head_attention_adapter_module.MultiHeadAttentionAdapterConfig(
              n_head=kwargs.get("n_head", 1), n_feat=in_features
          )
      elif atype == "relmha":
          cfg = multi_head_attention_adapter_module.RelPositionMultiHeadAttentionAdapterConfig(
              n_head=kwargs.get("n_head", 1), n_feat=in_features
          )
  
      print(cfg._target_)
  
      cfg = OmegaConf.structured(cfg)
      return cfg
  
imports: import pytest
  import torch
  from omegaconf import DictConfig, ListConfig, OmegaConf
  from nemo.collections.asr.models import ASRModel, EncDecCTCModel, EncDecRNNTModel
  from nemo.collections.asr.parts.submodules.adapters import multi_head_attention_adapter_module
  from nemo.collections.asr.parts.utils import adapter_utils
  from nemo.collections.common.parts import adapter_modules
  from nemo.core.classes.mixins.access_mixins import AccessMixin
  from nemo.core.classes.mixins.adapter_mixins import AdapterModuleMixin, get_registered_adapter
  from nemo.core.utils import numba_utils
  from nemo.core.utils.numba_utils import __NUMBA_MINIMUM_VERSION__
  from nemo.utils import config_utils, model_utils
label_desc: Use image node_id 5 for calling a global function with example usage: get_adapter_cfg(in_features, dim, norm_pos, atype) and returns: cfg