code: def forward(self, attention_mask, bert_embeddings):
      # Prepares attention mask for feeding into the self-attention
      device = bert_embeddings[0].device
      if attention_mask:
          valid_token_mask = attention_mask
      else:
          valids = []
          for sent in bert_embeddings:
              valids.append(torch.ones(len(sent), device=device))
  
          padded_data = torch.nn.utils.rnn.pad_sequence(
              valids, batch_first=True, padding_value=-100
          )
  
          valid_token_mask = padded_data != -100
  
      valid_token_mask = valid_token_mask.to(device=device)
      padded_embeddings = torch.nn.utils.rnn.pad_sequence(
          bert_embeddings, batch_first=True, padding_value=0
      )
  
      # Project the pretrained embedding onto the desired dimension
      extra_content_annotations = self.project_pretrained(
          padded_embeddings
      )
  
      # Add positional information through the table
      encoder_in = self.add_timing(
          self.pattention_morpho_emb_dropout(extra_content_annotations)
      )
      encoder_in = self.transformer_input_norm(encoder_in)
      # Put the partitioned input through the partitioned attention
      annotations = self.pattn_encoder(encoder_in, valid_token_mask)
  
      return annotations
  
imports: import copy
  import math
  import torch
  import torch.nn
  import torch.nn.functional
  from stanza.models.constituency.positional_encoding import ConcatSinusoidalEncoding
label_desc: Use image node_id 2 for calling the PartitionedTransformerModule obj's underlying member method code with example usage: obj.forward(attention_mask, bert_embeddings) and returns: annotations