class_docstr: Megatron specific extensions of torch Module with support
  for pipelining.
code: def position_embeddings_weight(self):
      if self.pre_process:
          if hasattr(self, "language_model"):
              return (
                  self.language_model.embedding.position_embeddings.weight
              )
          elif hasattr(self, "encoder_embedding"):
              return self.encoder_embedding.position_embeddings.weight
          elif hasattr(self, "decoder_embedding"):
              return self.decoder_embedding.position_embeddings.weight
          else:
              raise ValueError(
                  f"Pre_process is True, but no embedding is found on this rank. Looked for language_model.embedding, encoder_embedding, and decoder_embedding"
              )
      else:
          # We only need position embeddings on the encoder and decoder first stages where pre_process=True
          raise ValueError(
              f"Pre_process is False, there is no position embedding on this rank."
          )
  
imports: import torch
  from torch.autograd import Variable
  from torch.nn.parameter import Parameter
  from nemo.collections.nlp.modules.common.megatron.utils import ApexGuardDefaults
  from nemo.utils import logging
label_desc: Use image node_id 3 for calling the MegatronModule obj's underlying member method code with example usage: obj.position_embeddings_weight() and returns: self, self, self