Added NetworkX conversion functionality + corresponding tests.