Update the pretty graph cookbook to use labels

This fixes the output graph that was incorrect because of an isolation bug
where you could read a deleted node in an open transaction.
Merge pull request #1904 from jakub-/pretty-graph-cookbook-labels

Update the pretty graph cookbook to use labels