'Internal method used as get_result_hook for BeginTransaction.'

def __begin_transaction_hook(self, rpc):

    self.check_rpc_success(rpc)
    if (self._api_version == _CLOUD_DATASTORE_V1):
        return rpc.response.transaction
    else:
        return rpc.response
