    def reorder_encoder_out(self, encoder_out, new_order):
        """
        Reorder encoder output according to `new_order`.

        Args:
            encoder_out: output from the ``forward()`` method
            new_order (LongTensor): desired order

        Returns:
            `encoder_out` rearranged according to `new_order`
        """
        raise NotImplementedError
Reorder encoder output according to `new_order`.

Args:
encoder_out: output from the ``forward()`` method
new_order (LongTensor): desired order

Returns:
`encoder_out` rearranged according to `new_order`
fairseq/models/fairseq_encoder.py