class_docstr: Transformer language model.
  
  Arguments:
      transformer_hparams: transformer hyperparameters
      vocab_size: vocabulary size
      max_sequence_length: maximum size of sequence. This
                           is used for positional embedding
      embedding_dropout_prob: dropout probability for embeddings
      num_tokentypes: size of the token-type embeddings. 0 value
                      will ignore this embedding
docstr: Customized load.
docstr_tok: ["Customized","load","."]
code: def load_state_dict(self, state_dict, strict=True):
      """Customized load."""
  
      # Embedding.
      if self.pre_process:
          if self._embedding_key in state_dict:
              state_dict_ = state_dict[self._embedding_key]
          else:
              # for backward compatibility.
              state_dict_ = {}
              for key in state_dict.keys():
                  if "_embeddings" in key:
                      state_dict_[key] = state_dict[key]
          self.embedding.load_state_dict(state_dict_, strict=strict)
  
      # Encoder.
      if self._encoder_key in state_dict:
          state_dict_ = state_dict[self._encoder_key]
  
      # for backward compatibility.
      elif "transformer" in state_dict:
          state_dict_ = state_dict["transformer"]
      else:
          # for backward compatibility.
          state_dict_ = {}
          for key in state_dict.keys():
              if self._encoder_key + "." in key:
                  state_dict_[
                      key.split(self._encoder_key + ".")[1]
                  ] = state_dict[key]
              elif "transformer." in key:
                  state_dict_[
                      key.split("transformer.")[1]
                  ] = state_dict[key]
  
      # for backward compatibility.
      state_dict_self_attention = {}
      for key in state_dict_.keys():
          if ".attention." in key:
              state_dict_self_attention[
                  key.replace(".attention.", ".self_attention.")
              ] = state_dict_[key]
          else:
              state_dict_self_attention[key] = state_dict_[key]
      state_dict_ = state_dict_self_attention
  
      self.encoder.load_state_dict(state_dict_, strict=strict)
  
      if self.post_process:
          # pooler
          if self.add_pooler:
              assert (
                  "pooler" in state_dict
              ), "could not find data for pooler in the checkpoint"
              self.pooler.load_state_dict(
                  state_dict[self._pooler_key], strict=strict
              )
          if not self.share_embeddings_and_output_weights:
              # import pdb; pdb.set_trace()
              assert (
                  self._output_layer_key in state_dict
              ), "could not find data for output embedding layer in the checkpoint"
              self.output_layer.load_state_dict(
                  state_dict[self._output_layer_key], strict=strict
              )
  
      # decoder
      if self.add_decoder:
          assert (
              "decoder" in state_dict
          ), "could not find data for pooler in the checkpoint"
          self.decoder.load_state_dict(
              state_dict[self._decoder_key], strict=strict
          )
  
imports: from ast import Mod
  import torch
  from nemo.collections.nlp.modules.common.megatron.adapters.parallel_adapters import AdapterName, PromptEncoderAdapterConfig
  from nemo.collections.nlp.modules.common.megatron.layer_type import LayerType
  from nemo.collections.nlp.modules.common.megatron.module import MegatronModule
  from nemo.collections.nlp.modules.common.megatron.position_embedding import ALiBiRelativePositionEmbedding, KERPLERelativePositionEmbedding, RotaryEmbedding, SandwichRelativePositionEmbedding
  from nemo.collections.nlp.modules.common.megatron.transformer import ParallelTransformer
  from nemo.collections.nlp.modules.common.megatron.utils import ApexGuardDefaults, get_linear_layer, init_method_normal, scaled_init_method_normal
  from nemo.collections.nlp.parts import utils_funcs
  from nemo.core import adapter_mixins
label_desc: Use image node_id 6 for calling the TransformerLanguageModel obj's underlying member method code with example usage: obj.load_state_dict(state_dict, strict) without return types