BF: fix import statement for networkx
PEP8: reformat code to match PEP8 better
NF: add networkx to bad_externals