class_docstr: Fake for datastore transaction.
  
  See https://cloud.google.com/datastore/docs/concepts/transactions
  for details of how transactions work in Cloud Datastore.
class_docstr_tok: ["Fake","for","datastore","transaction",".","See","https",":","\/\/cloud.google.com\/datastore\/docs\/concepts\/transactions","for","details","of","how","transactions","work","in","Cloud","Datastore","."]
docstr: Commits transaction.
docstr_tok: ["Commits","transaction","."]
code: def commit(self):
      """Commits transaction."""
      self._check_transaction_started()
      # before committing transaction verity that all entities which
      # were read or updated in the transaction were not modified outside
      # of transaction
      touched_keys = self._read_keys | set(
          [e.key for e in self._mutations]
      )
      for k in touched_keys:
          old_value = self._data_snapshot.get(k)
          cur_value = self._client.entities.get(k)
          if old_value != cur_value:
              self.rollback()
              raise Exception(
                  "Transaction can not be committed due to "
                  "conflicted updates in datastore."
              )
      # commit all changes
      self._state = "committed"
      for m in self._mutations:
          self._client.put(m)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  from io import StringIO
  import six
label_desc: Use image node_id 5 for calling the FakeDatastoreClientTransaction obj's underlying member method code with example usage: obj.commit() without return types