NetworkX bond graph