src/transformers/models/pegasus_x/modeling_pegasus_x.py/PegasusXPreTrainedModel/_set_gradient_checkpointing
class PegasusXPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, (PegasusXDecoder, PegasusXEncoder)):
            module.gradient_checkpointing = value