class_docstr: Transformer encoder-decoder model.
      
class_docstr_tok: ["Transformer","encoder-decoder","model","."]
docstr: For easy load.
docstr_tok: ["For","easy","load","."]
code: def state_dict_for_save_checkpoint(
      self, destination=None, prefix="", keep_vars=False
  ):
      """For easy load."""
  
      state_dict_ = {}
  
      state_dict_[
          self._encoder_key
      ] = self.encoder.state_dict_for_save_checkpoint(
          destination, prefix, keep_vars
      )
      state_dict_[
          self._decoder_key
      ] = self.decoder.state_dict_for_save_checkpoint(
          destination, prefix, keep_vars
      )
  
      if self.hiddens_module is not None:
          state_dict_[
              self._hiddens_module
          ] = self.hiddens_module.state_dict(
              destination, prefix, keep_vars
          )
  
      return state_dict_
  
file_path: NeMo/nemo/collections/nlp/modules/common/megatron/megatron_encoder_decoder.py
imports: from ast import Mod
  import torch
  from nemo.collections.nlp.modules.common.megatron.hiddens import MegatronHiddensModule
  from nemo.collections.nlp.modules.common.megatron.megatron_perceiver_encoders import MegatronPerceiverEncoderModule
  from nemo.collections.nlp.modules.common.megatron.module import MegatronModule
  from nemo.collections.nlp.modules.common.megatron.utils import ApexGuardDefaults
label_desc: Use image node_id 6 for calling the MegatronTransformerEncoderDecoderModule obj's underlying member method code with example usage: obj.state_dict_for_save_checkpoint(destination, prefix, keep_vars) and returns: state_dict_