keras/src/callbacks/swap_ema_weights.py/SwapEMAWeights/_backend_finalize_ema_values
class SwapEMAWeights:    def _backend_finalize_ema_values(self, optimizer):
        for var, average_var in zip(
            self.model.trainable_variables,
            optimizer._model_variables_moving_average,
        ):
            average_var.assign(var)