def parse_validator(name, config_node):
    '''Parse a validator from configuration and use it '''
    name = name.lower()
    if VALIDATORS not in name:
        raise ValueError(
            "Name {0} is not a named validator type!".format(name))
    valid = VALIDATORS[name](config_node)

    if valid.name is None:  # Carry over validator name if none set in parser
        valid.name = name
    if valid.config is None:  # Store config info if absent
        valid.config = config_node
    return valid
dataset/ETHPy150Open svanoort/pyresttest/pyresttest/validators.py/parse_validator/swapped operands of `not in`