keras/src/utils/tracking.py/TrackedDict/pop
class TrackedDict:    def pop(self, key, default=None):
        if self.tracker:
            value = super().pop(key, default)
            if value is not default:
                self.tracker.untrack(value)
            return value
        else:
            return super().pop(key, default)