src/transformers/models/time_series_transformer/modeling_time_series_transformer.py/TimeSeriesTransformerPreTrainedModel/_set_gradient_checkpointing
class TimeSeriesTransformerPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, (TimeSeriesTransformerDecoder, TimeSeriesTransformerEncoder)):
            module.gradient_checkpointing = value