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.