keras/src/utils/tracking.py/TrackedList/pop
class TrackedList:    def pop(self, index=-1):
        if self.tracker:
            value = self[index]
            self.tracker.untrack(value)
            return super().pop(index)
        else:
            return super().pop(index)