def get_all_terminals_of_inner_node(phylo_tree, node_id):
    """
        Given a phylogenetic tree and a preorder ID of an inner node, return
        a list of all leaf nodes of the subtree rooted at the inner node.
    """

    # Since the node IDs are unique, the loop is only iterated once.
    leaf_nodes = list()
    for clade in phylo_tree.find_clades(name=node_id, order='preorder'):
        leaf_nodes += clade.get_terminals(order='postorder')

    return leaf_nodes