def get_nx_pos(g):
    """Get x,y positions from a NetworkX CONSTELLATION graph.

    The returned dictionary is suitable to pass to networkx.draw(g, pos)."""

    pos = {}
    for n in g.nodes:
        x = g.nodes[n]['x']
        y = g.nodes[n]['y']
        pos[n] = x, y

    return pos