src/transformers/models/longt5/modeling_longt5.py/LongT5PreTrainedModel/_set_gradient_checkpointing
class LongT5PreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, (LongT5Attention, LongT5Stack)):
            module.gradient_checkpointing = value