def retrieve_adjacency_list(cgpms, v_to_c):
    """Return map of cgpm index to list of indexes of its parent cgpms."""
    return {
        i: list(set(v_to_c[p] for p in c.inputs if p in v_to_c))
        for i, c in enumerate(cgpms)
    }