def parse_policy(policy):
    ret = {}
    ret['name'] = policy['name']
    ret['type'] = policy['type']
    attrs = policy['Attributes']

    if policy['type'] != 'SSLNegotiationPolicyType':
        return ret

    ret['sslv2'] = bool(attrs.get('Protocol-SSLv2'))
    ret['sslv3'] = bool(attrs.get('Protocol-SSLv3'))
    ret['tlsv1'] = bool(attrs.get('Protocol-TLSv1'))
    ret['tlsv1_1'] = bool(attrs.get('Protocol-TLSv1.1'))
    ret['tlsv1_2'] = bool(attrs.get('Protocol-TLSv1.2'))
    ret['server_defined_cipher_order'] = bool(attrs.get('Server-Defined-Cipher-Order'))
    ret['reference_security_policy'] = attrs.get('Reference-Security-Policy', None)

    non_ciphers = [
        'Server-Defined-Cipher-Order',
        'Protocol-SSLv2',
        'Protocol-SSLv3',
        'Protocol-TLSv1',
        'Protocol-TLSv1.1',
        'Protocol-TLSv1.2',
        'Reference-Security-Policy'
    ]

    ciphers = []
    for cipher in attrs:
        if attrs[cipher] and non_ciphers not in cipher:
            ciphers.append(cipher)

    ciphers.sort()
    ret['supported_ciphers'] = ciphers

    return ret
dataset/ETHPy150Open Netflix/security_monkey/security_monkey/watchers/elb.py/parse_policy/swapped operands of `not in`