def create_nodenames_from_branching_factors(BFS):
    """
    This function creates the node names of a tree without creating the whole tree.

    Parameters
    ----------
    BFS : list of integers
        Branching factors.

    Returns
    -------
    nodenames : list of str
        a list of the node names induced by branching_factors, including leaf nodes.

    """
    stage_nodes = ["ROOT"]
    nodenames = ['ROOT']
    if len(BFS)==1 : #2stage
        return(nodenames)
    for bf in BFS[:(len(BFS))]:
        old_stage_nodes = stage_nodes
        stage_nodes = []
        for k in range(len(old_stage_nodes)):
            stage_nodes += ['%s_%i'%(old_stage_nodes[k],b) for b in range(bf)]
        nodenames += stage_nodes
    return nodenames