def __check_state(self, opname):
    if (self._state is not TransactionState.STARTED):
        if (self._state is TransactionState.NEW):
            raise errors.InterfaceError('cannot {}; the transaction is not yet started'.format(opname))
        self.__check_state_base(opname)
def __check_state(self, opname):
    if (self._state is not TransactionState.STARTED):
        if (self._state is TransactionState.NEW):
            raise errors.InterfaceError('cannot {}; the transaction is not yet started'.format(opname))
        self.__check_state_base(opname)