def walk(ast):
    yield ast
for arg in getattr(ast, 'args', []):
    for node in walk(arg):
        yield node
write_curve = next(node for node in walk(rpn_to_ast(rpn)) if node.token.
    ttype == 'function' and node.token.tvalue == 'WriteCurve')
print(write_curve.args[2].token.tvalue)
R10C3
parsing excel style formula