src/transformers/models/bigbird_pegasus/modeling_bigbird_pegasus.py/BigBirdPegasusPreTrainedModel/_set_gradient_checkpointing
class BigBirdPegasusPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, (BigBirdPegasusDecoder, BigBirdPegasusEncoder)):
            module.gradient_checkpointing = value