def merge_label_map(label_map, label_equivalent):
    """
    A function return label_map after merge all label equivalent

    @param:
        - label_map (before merge label)
        - label_equivalent (a collection key label has merged)
    @return:
        - label_map after merge label
    """
    for row in range(len(label_map)):
        for col in range(len(label_map[row])):
            if label_map[row][col].label in label_equivalent.keys():
                label_map[row][col].label = min(list(label_equivalent[
                    label_map[row][col].label]))
    return label_map
