Looking at this page (in it's entirety): http://googlecloudplatform.github.io/gcloud-python/latest/datastore-transactions.html
Minor thing here, but would be more clear if we explicitly wrote datastore.Transaction.
Basically s/Transaction()/datastore.Transaction()/