def get_tree_nodes(node):

    """Find all the nodes of the tree starting in the passed node"""

    # include the current node
    nodes = [node]

    # explore children
    if not node.is_terminal:
        if node.right_child:
            nodes.extend(get_tree_nodes(node.right_child))
        if node.left_child:
            nodes.extend(get_tree_nodes(node.left_child))

    return nodes