def connect_segmentation(connect, list_connections):
    """
    connect label like:
    connect = {             connect = {
        1: {2,3,4}              1 : {2,3,4,5,6,7,8,9}
        2: {5,6}        =>  }
        3: {7,8,9}
    }
    @param connect : dict contain all pixels label and sprite's label that key belong to
    @param list_key_connect : list contain all key label in dict connect
    """
    for x in reversed(list_connections):
        count = 0
        try:
            connect[x] = list(set(connect[x]))
            while count < len(connect[x]):
                connect[x] += connect[connect[x][count]]
                connect[x] = list(set(connect[x]))
                count += 1
        except IndexError:
            continue
