code: def encode(self,
                 data: mx.sym.Symbol,
                 data_length: mx.sym.Symbol,
                 seq_len: int) -> Tuple[mx.sym.Symbol, mx.sym.Symbol, int]:
          
          if self.layout[0] == 'N':
              data = mx.sym.swapaxes(data=data, dim1=0, dim2=1)
          data = self._encode(data, data_length, seq_len)
          if self.layout[0] == 'N':
              data = mx.sym.swapaxes(data=data, dim1=0, dim2=1)
          return data, data_length, seq_len
docs: Encodes data given sequence lengths of individual examples and maximum sequence length.
  
          :param data: Input data.
          :param data_length: Vector with sequence lengths.
          :param seq_len: Maximum sequence length.
          :return: Encoded versions of input data (data, data_length, seq_len).