def invalidate(self):
<EOL>value = (self.is_affine) and self.INVALID_AFFINE or self.INVALID<EOL>if self._invalid == value:<EOL><INDENT>return<EOL><DEDENT>if not len(self._parents):<EOL><INDENT>self._invalid = value<EOL>return<EOL><DEDENT>stack = [self]<EOL>while len(stack):<EOL><INDENT>root = stack.pop()<EOL>if root._invalid != value or root.pass_through:<EOL><INDENT>root._invalid = self.INVALID<EOL>stack.extend(list(root._parents.keys()))<EOL><DEDENT><DEDENT>
Invalidate this :class:`TransformNode` and all of its
ancestors.  Should be called any time the transform changes.