From https://developers.google.com/appengine/docs/python/datastore/transactions