'This function is responsible for validating nice_value.
@type return_bool: bool
@param return_bool: True when we are only interested in the result of the
validation, and not the validated rule itself.
@type valid_rule: bool
@param valid_rule: returns True if everything is valid. False if it encounters any
abnormalities in the config.
@type original_rule: dict
@param original_rule: contains the original received rule
@type counter: int
@param counter: this counter is used to identify what rule # is currently being
validated. Necessary for log output.
@type tool: str
@param tool: the name of the current tool. Necessary for log output.
@rtype: bool, dict (tuple)
@return: validated rule and result of validation'

@classmethod
def __validate_nice_value(cls, valid_rule, return_bool, rule, tool, counter):

    if ('nice_value' in rule):
        if ((rule['nice_value'] < (-20)) or (rule['nice_value'] > 20)):
            error = ('nice_value    goes    from    -20    to    20;    rule    ' + str(counter))
            error += (("    in    '" + str(tool)) + "'    has    a    nice_value    of    '")
            error += (str(rule['nice_value']) + "'.")
            if (not return_bool):
                error += '    Setting    nice_value    to    0.'
                rule['nice_value'] = 0
            if verbose:
                log.debug(error)
            valid_rule = False
    else:
        error = ((('No    nice_value    found    for    rule    ' + str(counter)) + "    in    '") + str(tool))
        error += "'."
        if (not return_bool):
            error += '    Setting    nice_value    to    0.'
            rule['nice_value'] = 0
        if verbose:
            log.debug(error)
        valid_rule = False
    return (valid_rule, rule)
