code: def gen_input(
      self, token_ids, type_ids, pos_ids, input_mask, aux_emb=None
  ):
      token_emb_out = self.word_embedding_layer(token_ids)
      type_emb_out = self.sent_embedding_layer(type_ids)
      pos_emb_out = self.pos_embedding_layer(pos_ids)
      emb_out = token_emb_out + type_emb_out + pos_emb_out
  
      # auxiliary memory embeddings
      if aux_emb is not None:
          emb_out = paddle.concat([aux_emb, emb_out], axis=1)
  
      emb_out = self.dropout_layer(emb_out)
  
      # generate n-head self-attention mask
      self_attn_mask = input_mask
      self_attn_mask = paddle.scale(
          x=self_attn_mask, scale=1e4, bias=-1.0, bias_after_scale=False
      )
      n_head_self_attn_mask = paddle.stack(
          x=[self_attn_mask] * self.n_head, axis=1
      )
      n_head_self_attn_mask.stop_gradient = True
  
      return emb_out, n_head_self_attn_mask
  
imports: from collections import namedtuple
  import paddle
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 3 for calling the Plato2Encoder obj's underlying member method code with example usage: obj.gen_input(token_ids, type_ids, pos_ids, input_mask, aux_emb) and returns: emb_out,  n_head_self_attn_mask