code: def __init__(self, cfg):
      adapter_tuning_cfg = cfg.peft.adapter_tuning
  
      config_args = {
          "in_features": cfg.hidden_size,
          "out_features": cfg.hidden_size,
          "dim": adapter_tuning_cfg.adapter_dim,
          "norm_position": adapter_tuning_cfg.get(
              "norm_position", "pre"
          ),
          "norm_type": adapter_tuning_cfg.get(
              "norm_type", "mixedfusedlayernorm"
          ),
          "column_init_method": adapter_tuning_cfg.get(
              "column_init_method", "xavier"
          ),
          "row_init_method": adapter_tuning_cfg.get(
              "row_init_method", "zero"
          ),
          "dropout": adapter_tuning_cfg.adapter_dropout,
      }
  
      if adapter_tuning_cfg.weight_tying:
          config_args.update(
              {
                  "num_position_embeddings": cfg.num_layers * 2,
                  "dim_position_embeddings": cfg.hidden_size,
                  "position_embedding_strategy": adapter_tuning_cfg.get(
                      "position_embedding_strategy", None
                  ),
              }
          )
          adapter_cfg = ParallelLinearAdapterWeightTyingConfig(
              **config_args
          )
      else:
          adapter_cfg = ParallelLinearAdapterConfig(**config_args)
  
      name_key_to_cfg = {
          AdapterName.PRE_ATTN_ADAPTER: adapter_cfg,
          AdapterName.POST_ATTN_ADAPTER: adapter_cfg,
      }
      self.name_key_to_mcore_mixins = {
          AdapterName.PRE_ATTN_ADAPTER: [
              ("", MCoreTransformerLayerMixin)
          ],
          AdapterName.POST_ATTN_ADAPTER: [
              ("", MCoreTransformerLayerMixin)
          ],
      }
  
      super().__init__(adapter_tuning_cfg, name_key_to_cfg)
  
imports: from typing import Dict
  from omegaconf import DictConfig
  from nemo.collections.nlp.modules.common.megatron.adapters.parallel_adapters import AdapterName, InfusedAdapterConfig, LoraKQVAdapterConfig, LoraKQVAdapterWeightTyingConfig, MLPInfusedAdapterConfig, ParallelLinearAdapterConfig, ParallelLinearAdapterWeightTyingConfig, PromptEncoderAdapterConfig
label_desc: Use image node_id 1 to create a new CanonicalAdaptersPEFTConfig object from inherited base classes: PEFTConfig with example: obj = CanonicalAdaptersPEFTConfig(cfg)