code: def encode(self,
                 data: mx.sym.Symbol,
                 data_length: Optional[mx.sym.Symbol],
                 seq_len: int) -> Tuple[mx.sym.Symbol, mx.sym.Symbol, int]:
          
          positions = mx.sym.arange(0, seq_len)
          embedding = self.encode_positions(positions, data)
          return embedding, data_length, seq_len
docs: :param data: (batch_size, source_seq_len, num_embed)
          :param data_length: (batch_size,)
          :param seq_len: sequence length.
          :return: (batch_size, source_seq_len, num_embed)