graph as dict of dict