class_docstr: TODO  (@adithyare)
class_docstr_tok: ["TODO","(","@","adithyare",")"]
code: def _get_adapter_cfg(self, component_cfg):
      if component_cfg.adapter_tuning.type == "parallel_adapter":
          adapter_cfg = ParallelLinearAdapterConfig(
              in_features=component_cfg.hidden_size,
              out_features=component_cfg.hidden_size,
              dim=component_cfg.adapter_tuning.adapter_dim,
              norm_position=component_cfg.adapter_tuning.get(
                  "norm_position", "pre"
              ),
              norm_type=component_cfg.adapter_tuning.get(
                  "norm_type", "mixedfusedlayernorm"
              ),
              column_init_method=component_cfg.adapter_tuning.get(
                  "column_init_method", "xavier"
              ),
              row_init_method=component_cfg.adapter_tuning.get(
                  "row_init_method", "zero"
              ),
              dropout=component_cfg.adapter_tuning.adapter_dropout,
          )
      else:
          adapter_cfg = LinearAdapterConfig(
              in_features=component_cfg.hidden_size,
              dim=component_cfg.adapter_tuning.adapter_dim,
              norm_position=component_cfg.adapter_tuning.get(
                  "norm_position", "pre"
              ),
              dropout=component_cfg.adapter_tuning.adapter_dropout,
          )
      return adapter_cfg
  
imports: import itertools
  from typing import Any
  import torch
  from omegaconf.dictconfig import DictConfig
  from omegaconf.omegaconf import open_dict
  from pytorch_lightning.trainer.trainer import Trainer
  from nemo.collections.common.parts.adapter_modules import LinearAdapterConfig
  from nemo.collections.nlp.models.language_modeling.megatron_t5_model import MegatronT5Model
  from nemo.collections.nlp.models.language_modeling.megatron_t5_prompt_learning_model import MegatronT5PromptLearningModel
  from nemo.collections.nlp.models.language_modeling.megatron_t5_sft_model import MegatronT5SFTModel
  from nemo.collections.nlp.modules.common import VirtualPromptStyle
  from nemo.collections.nlp.modules.common.megatron.adapters.parallel_adapters import AdapterName, InfusedAdapterConfig, LoraKQVAdapterConfig, LoraKVAdapterConfig, LoraQAdapterConfig, MLPInfusedAdapterConfig, ParallelLinearAdapterConfig
  from nemo.collections.nlp.parts.utils_funcs import get_last_rank
  from nemo.core.classes.mixins import adapter_mixins
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 4 for calling the MegatronT5AdapterLearningModel obj's underlying member method code with example usage: obj._get_adapter_cfg(component_cfg) and returns: adapter_cfg