def multiLevelConstantSampleNumber(inputDict, newLevels):
    """
    Returns a list of sample numbers of same length as the number of levels of
    deault hierarchy. Keeps constant the number of samples from defaultHierarchy if an
    entry of newLevels exists in deafultHierarchy. If not, allocate a default
    newSampleNumber to the entry.
    """
    defaultHierarchy = inputDict['defaultHierarchy']
    newSampleNumber = inputDict['newSampleNumber']
    new_samples = []
    for level in newLevels:
        is_level_found = False
        for defaultElement in defaultHierarchy:
            if (level == defaultElement[0]):
                new_samples.append(1*defaultElement[1])
                is_level_found = True
                break
        if (is_level_found is False):
            new_samples.append(newSampleNumber)
    return new_samples