def is_valid(neighbours, colors):
    """Does something similar to is_solved, but also works if not all countries
    have a color assigned yet

    :param neighbours: A dict with country as keys, list of neighbours as values
    :param colors: A list indicating which country has which color or None.
    :return: Boolean
    """
    for country in neighbours:
        color = colors[country]
        for neighbour in neighbours[country]:
            if color is None or colors[neighbour] is None:
                continue
            elif colors[neighbour] == color:
                return False
    return True