def _astnode(s):
    """Return a Python ast Node compiled from a string."""
    try:
        import ast
    except ImportError:
        return eval(s)
    p = ast.parse('__tempvalue__ = ' + s)
    return p.body[0].value
