def METHOD_NAME(each_version):
    def check(node):
        assert node.type not in ('error_leaf', 'error_node')
        try:
            children = node.children
        except AttributeError:
            pass
        else:
            for child in children:
                check(child)
    check(parse("if foo:\n bar", version=each_version))