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: Checks old state and updates it to new state.
docstr_tok: ["Checks","old","state","and","updates","it","to","new","state","."]
code: def _check_update_state(self, old_state, new_state):
      """Checks old state and updates it to new state."""
      if self._state != old_state:
          raise ValueError(
              "Invalid state of transaction, expected %s, was %s"
              % (old_state, self._state)
          )
      self._state = new_state
  
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 3 for calling the FakeDatastoreClientTransaction obj's underlying member method code with example usage: obj._check_update_state(old_state, new_state) without return types