Fix formatting for printing graphs
Fix output for tests related to graphs