def check_registry(self, *specs, options={}):
        """
        Perform checks that only require to compare values in the registry with expected values, according to the specs
        a spec may be either a 3-tuple: (key name, value name, expected value), or a 4-tuple (key name, value name, expected value, operation), where operation is a function that implements a comparison operator
        """
        default_options = {
            'lastWins':False,
            'stopOnOK':False,
            'stopOnKO':False,
            'KOIfMissing':True
        }
        default_options.update(options)
        options = default_options
        op = operator.eq
        ok = True
        reasons = []

        for spec in specs:
            try:
                if len(spec) == 3:
                    (key, value_name, expected_value) = spec
                elif len(spec) == 4:
                    (key, value_name, expected_value, op) = spec
                else:
                    ok = False
                    reasons = ['Check could not be performed (invalid specification provided)']
                    return ok, reasons
            except Exception as e:
                self.module.log.error(f'Check could not be performed. Details: specs={specs}, dce={self.dce}, error: {e}')
                return ok, reasons

            if op == operator.eq:
                opstring = '{left} == {right}'
                nopstring = '{left} != {right}'
            elif op == operator.contains:
                opstring = '{left} in {right}'
                nopstring = '{left} not in {right}'
            elif op == operator.gt:
                opstring = '{left} > {right}'
                nopstring = '{left} <= {right}'
            elif op == operator.ge:
                opstring = '{left} >= {right}'
                nopstring = '{left} < {right}'
            elif op == operator.lt:
                opstring = '{left} < {right}'
                nopstring = '{left} >= {right}'
            elif op == operator.le:
                opstring = '{left} <= {right}'
                nopstring = '{left} > {right}'
            elif op == operator.ne:
                opstring = '{left} != {right}'
                nopstring = '{left} == {right}'
            else:
                opstring = f'{op.__name__}({{left}}, {{right}}) == True'
                nopstring = f'{op.__name__}({{left}}, {{right}}) == True'

            value = self.reg_query_value(self.dce, self.connection, key, value_name)

            if type(value) == DCERPCSessionError:
                if options['KOIfMissing']:
                    ok = False
                if value.error_code in (ERROR_NO_MORE_ITEMS, ERROR_FILE_NOT_FOUND):
                    reasons.append(f'{key}: Key not found')
                elif value.error_code == ERROR_OBJECT_NOT_FOUND:
                    reasons.append(f'{value_name}: Value not found')
                else:
                    ok = False
                    reasons.append(f'Error while retrieving value of {key}\\{value_name}: {value}')
                continue

            if op(value, expected_value):
                if options['lastWins']:
                    ok = True
                reasons.append(opstring.format(left=f'{key}\\{value_name} ({value})', right=expected_value))
            else:
                reasons.append(nopstring.format(left=f'{key}\\{value_name} ({value})', right=expected_value))
                ok = False
            if ok and options['stopOnOK']:
                break
            if not ok and options['stopOnKO']:
                break

        return ok, reasons

        Perform checks that only require to compare values in the registry with expected values, according to the specs
        a spec may be either a 3-tuple: (key name, value name, expected value), or a 4-tuple (key name, value name, expected value, operation), where operation is a function that implements a comparison operator
        
cme/modules/wcc.py