def boolean(value):
    """
    Returns bool represented by the value. This is different from
    calling the builtin bool() in that it will interpret string representations.
    e.g. boolean('0') and boolean('false') will both yield False.

    """
    false_strings = ['', '0', 'n', 'no', 'off']
    if isinstance(value, basestring):
        value = value.lower()
        if false_strings in value or 'false'.startswith(value):
            return False
    return bool(value)
dataset/ETHPy150Open ARM-software/workload-automation/wlauto/utils/types.py/boolean/swapped operands of `in`