src/transformers/models/longformer/modeling_longformer.py/LongformerPreTrainedModel/_set_gradient_checkpointing
class LongformerPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, LongformerEncoder):
            module.gradient_checkpointing = value