def unique_ancestors(node):
    results = []
    try:
        current = node.parent()
    except AttributeError:
        # if node is a leaf, we cannot retrieve its parent
        return results
    while current and len(current) == 1:
        results.append(current)
        current = current.parent()
    return results
Defines the entire math expression for BigQuery queries.
dataset/ETHPy150Open nltk/nltk/nltk/tgrep.py/unique_ancestors--crossover with--dataset/ETHPy150Open google/encrypted-bigquery-client/src/query_parser.py/_MathParser