add net.id to get_node_networks_optimized

Change-Id: Ib8c4969624a1d59e1849b05d02d17f2cfccafb8b