def reorder_encoder_out(self, encoder_out: Dict[str, List[Tensor]], new_order):
        """
        Same as the one in transformer.py, with new_sentemb
        """
        if len(encoder_out["sentemb"]) == 0:
            new_sentemb = []
        else:
            new_sentemb = [encoder_out["sentemb"][0].index_select(0, new_order)]

        return {
            "sentemb": new_sentemb,  # B x C
        }

        Same as the one in transformer.py, with new_sentemb
        
understand_icl/fairseq/examples/laser/laser_src/laser_transformer.py