docstr: Creates a state_dict using only the adapter parameters.
  This ensures that this wrapper class will only checkpoint the adapter
  weights and not the rest of the base GPT Model.
code: def state_dict(self, destination=None, prefix=None, keep_vars=False):
      """
      Creates a state_dict using only the adapter parameters.
      This ensures that this wrapper class will only checkpoint the adapter
      weights and not the rest of the base GPT Model.
      """
      state_dict_ = {}
      for name, module in self.frozen_model.named_modules():
          if (
              isinstance(module, adapter_mixins.AdapterModuleMixin)
              and module.is_adapter_available()
          ):
              for adapter_key in self.adapter_name_keys:
                  adapter_module = module.get_adapter_module(
                      adapter_key
                  )
                  if adapter_module:
                      state_adapter_key = ":".join([name, adapter_key])
                      state_dict_[
                          state_adapter_key
                      ] = adapter_module.state_dict()
              module.set_enabled_adapters(enabled=True)
      return state_dict_
  
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 10 for calling the MegatronT5BaseAdapterModel obj's underlying member method code with example usage: obj.state_dict(destination, prefix, keep_vars) and returns: state_dict_