keras/src/callbacks/swap_ema_weights.py/SwapEMAWeights/on_epoch_begin
class SwapEMAWeights:    def on_epoch_begin(self, epoch, logs=None):
        if self.swap_on_epoch and self._ema_weights_in_model:
            self._swap_variables()
            self._ema_weights_in_model = False