Updated recipe 4 in chapter 6 with NetworkX export function.