def getDefaultLevels(dimnames, shape):
    """
    returns a dictionary of default levels (key, value) = (dimname, list of level names of the form "dimname level"
    
    Parameters
    ========== 
    dimnames : a list of str
        Names of the dimensions
    
    shape: a tuple/list
        Number of levels in each dimension

    Example
    ==========
        dimnames = ["Apple", "Banana"]
        shape = (3, 2)

        what gets returned will be:
        levels = {
            "Apple": ["Apple_0", "Apple_1", "Apple_2"],
            "Banana": ["Banana_0", "Banana_1"]
        }
    """
    leveldict = {}
    for d, dim in enumerate(dimnames):
        leveldict[dim] = [f"{dim}_{level}" for level in range(shape[d])]
    
    return leveldict