def is_independent_set(d, a):
    """
    test if vertices in `a` are independent in graph with dict `d`

    Parameters
    ==========

    d : dictionary of the graph
    a : tuple or list of vertices
    """
    n = len(a)
    for i in range(n):
        for j in range(i):
            k1 = a[i]
            k2 = a[j]
            if k1 in d[k2]:
                return False
    return True