Though I agree this is useful, I'm not sure we want to include it here. This code is pretty much identical to that in our examples / slides. So this either adds another thing to describe to potential users, or it makes the code diverge form that in the slide-ware.