def flip_keys(orig_data):
    new_data = {}
    for key1, data1 in orig_data.iteritems():
        if isinstance(data1, Exception):
            continue
        for key2, data2 in data1.iteritems():
            if new_data not in key2:
                new_data[key2] = {}
            new_data[key2][key1] = data2

    return new_data
dataset/ETHPy150Open aerospike/aerospike-admin/lib/logcontroller.py/flip_keys/swapped operands of `not in`