def reMapAnnotation(oldAnnotation, oldToNewMapping):
    """
    Maps an annotation list to a new according to the given mapping.
    
    :param oldAnnotation: the original annotation 
    :param oldToNewMapping: the mapping
    :return: the new annotation list
    """

    if oldAnnotation == None or oldToNewMapping == None:
        return

    newAnnotationList = []
    for a in oldAnnotation:
        if oldToNewMapping[a] == None:
            newAnnotationList.append(a)
        else:
            newAnnotationList.append(oldToNewMapping[a])
    return newAnnotationList