def removeCommonPrefix(oneKey, labelList):

    print " in removeCommonPrefix : ", labelList
    madeChange = 0

    nLabel = len(labelList)
    for ii in range(nLabel):
        for jj in range(ii + 1, nLabel):
            commonPrefix = getCommonPrefix(labelList[ii], labelList[jj])

            # if the commonPrefix is *ever* the entire string, then
            # we cannot really use this ...
            if (commonPrefix == labelList[ii]):
                continue
            if (commonPrefix == labelList[jj]):
                continue

            if (len(commonPrefix) > 4):
                print ii, jj, commonPrefix

                newKey = []
                for cLabel in oneKey:
                    if (cLabel.lower().startswith(commonPrefix)):
                        dLabel = cLabel[len(commonPrefix):]
                        if (len(dLabel) < 4):
                            dLabel = cLabel
                        else:
                            madeChange += 1
                    else:
                        dLabel = cLabel
                    if (dLabel[0] == '_'):
                        dLabel = dLabel[1:]
                    newKey += [dLabel]

                newList = []
                for cLabel in labelList:
                    if (cLabel.lower().startswith(commonPrefix)):
                        dLabel = cLabel[len(commonPrefix):]
                        if (len(dLabel) < 4):
                            dLabel = cLabel
                        else:
                            madeChange += 1
                    else:
                        dLabel = cLabel
                    if (dLabel[0] == '_'):
                        dLabel = dLabel[1:]
                    newList += [dLabel]

                if (len(labelList) == len(newList)):
                    labelList = newList
                    oneKey = newKey

    if (madeChange > 0):
        print " after removeCommonPrefix : ", madeChange, labelList

    return (oneKey, labelList)