keras/src/optimizers/base_optimizer.py/BaseOptimizer/_untrack_variable
class BaseOptimizer:    def _untrack_variable(self, variable):
        previous_lock_state = self._tracker.locked
        self._tracker.unlock()
        self._tracker.untrack(variable)
        if previous_lock_state is True:
            self._tracker.lock()