code: def forward(self, src_word, src_pos):
      src_word_emb = src_word
      src_word_emb = paddle.cast(src_word_emb, "float32")
      src_word_emb = paddle.scale(
          x=src_word_emb, scale=self.src_emb_dim**0.5
      )
      src_pos = paddle.squeeze(src_pos, axis=-1)
      src_pos_enc = self.emb(src_pos)
      src_pos_enc.stop_gradient = True
      enc_input = src_word_emb + src_pos_enc
      if self.dropout_rate:
          out = F.dropout(
              x=enc_input,
              p=self.dropout_rate,
              mode="downscale_in_infer",
          )
      else:
          out = enc_input
      return out
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import paddle
  from paddle import ParamAttr, nn
  from paddle import nn, ParamAttr
  from paddle.nn import functional
  import numpy
label_desc: Use image node_id 2 for calling the PrepareEncoder obj's underlying member method code with example usage: obj.forward(src_word, src_pos) and returns: out