src/transformers/models/pegasus_x/modeling_pegasus_x.py/PegasusXEncoderLayer/unpad_local_tokens
class PegasusXEncoderLayer:    def unpad_local_tokens(cls, padded_hidden_states, block_size):
        # padded_hidden_states: [batch_size, padded seq_len, hidden_dim]
        pad_size = block_size // 2
        return padded_hidden_states[:, pad_size:-pad_size, :]