keras/src/optimizers/base_optimizer.py/BaseOptimizer/_var_key
class BaseOptimizer:    def _var_key(self, variable):
        # Helper function to get a stable ID and the variable instance mapping.
        return id(variable)