def _set_read_options(request, eventual, transaction_id):
 if (eventual and (transaction_id is not None)):
  raise ValueError('eventual must be False when in a transaction')
 opts = request.read_options
 if eventual:
  opts.read_consistency = _datastore_pb2.ReadOptions.EVENTUAL
 elif transaction_id:
  opts.transaction = transaction_id

def _set_read_options ( request , eventual , transaction_id ) : if ( eventual and ( transaction_id is not None ) ) : raise ValueError ( 'eventual must be False when in a transaction' ) opts = request . read_options if eventual : opts . read_consistency = _datastore_pb2 . ReadOptions . EVENTUAL elif transaction_id : opts . transaction = transaction_id
validate rules for read options .