def get_leaf_nodes(struct):
    """ Get the list of leaf nodes.
    """
    leaf_list = []
    for idx, node in enumerate(struct):
        if node['is_leaf']:
            leaf_list.append(idx)
    return leaf_list