def walk(self, ast): "Validate each node in AST and return True if AST is 'safe'." self.visit(ast) return self.errors == []