def __check_state_base(self, opname):
    if (self._state is TransactionState.COMMITTED):
        raise errors.InterfaceError('cannot {}; the transaction is already committed'.format(opname))
    if (self._state is TransactionState.ROLLEDBACK):
        raise errors.InterfaceError('cannot {}; the transaction is already rolled back'.format(opname))
    if (self._state is TransactionState.FAILED):
        raise errors.InterfaceError('cannot {}; the transaction is in error state'.format(opname))
def __check_state_base(self, opname):
    if (self._state is TransactionState.COMMITTED):
        raise errors.InterfaceError('cannot {}; the transaction is already committed'.format(opname))
    if (self._state is TransactionState.ROLLEDBACK):
        raise errors.InterfaceError('cannot {}; the transaction is already rolled back'.format(opname))
    if (self._state is TransactionState.FAILED):
        raise errors.InterfaceError('cannot {}; the transaction is in error state'.format(opname))