def _rightmost_descendants(node):
    '''
    Returns the set of all nodes descended in some way through
    right branches from this node.
    '''
    try:
        rightmost_leaf = max(node.treepositions())
    except __HOLE__:
        return []
    return [node[rightmost_leaf[:i]] for i in range(1, len(rightmost_leaf) + 1)]
dataset/ETHPy150Open nltk/nltk/nltk/tgrep.py/_rightmost_descendants