def METHOD_NAME(_step_obj, condition, search_regex, _stash=EmptyStash):
    def fail(condition, name=None):
        text = 'matches' if condition == 'must not' else 'does not match'
        name = name if (
            name is not None or name is not False) else _step_obj.context.name
        pattern = 'Null/None' if regex == '\x00' else regex
        Error(_step_obj, '{} property in {} {} {} with {} {} regex. '
                         'It is set to {}.'.format(_step_obj.context.property_name,
                                                   name,
                                                   _step_obj.context.type,
                                                   text,
                                                   pattern,
                                                   regex_flag_error_text,
                                                   values))
    found = False
    def search(values):
        nonlocal found
        if found:
            return True
        if isinstance(values, (str, int, bool, float)) or values is None:
            matches = match.regex_match(regex, str(values))
            if (condition == 'must' and matches is not None) or (condition == "must not" and matches is None):
                found = True
                return found
        elif isinstance(values, list):
            return any(map(search, values))
        elif isinstance(values, dict):
            if not hasattr(_step_obj.context, 'address'):
                _step_obj.context.address = None
            _step_obj.context.address = values.get('address', _step_obj.context.address)
            if 'values' in values:
                return search(values['values'])
            else:
                return any(map(search, values.values()))
        return False
    match = _step_obj.context.match
    regex = r'{}'.format(search_regex)
    values = _step_obj.context.stash if _stash is EmptyStash else _stash
    regex_flag_error_text = 'case insensitive' if not match.case_sensitive else 'case sensitive'
    if not search(values):
        _stash = get_resource_name_from_stash(_step_obj.context.stash, _stash, _step_obj.context.address)
        fail(condition, name=_stash.get('address'))