def get_text(xs, read):
    """
    Read a Numerical value from the Leaf of a tree
    """
    if isinstance(xs, list):
        rs = list(map(lambda x: read(getattr(x, 'text')), xs))
    else:
        rs = read(xs.text)
    return rs
