def load_so():
    not_found = ImportError("Couldn't find libramcloud.so, ensure it is "
                            "installed and that you have registered it with "
                            "/sbin/ldconfig")

    # try to find the overridden path first, if possible using
    # LD_LIBRARY_PATH which means we don't have to install the so
    # during devel

    path = get_library_path()

    if not path:
        raise not_found
    try:
        so = ctypes.cdll.LoadLibrary(path)
    except OSError as e:
        if str(e) in 'No such file or directory':
            raise not_found
        else:
            raise

    def malloc_errcheck(result, func, arguments):
        if result == 0:
            raise MemoryError()
        return result

    # ctypes.c_bool was introduced in Python 2.6
    if not hasattr(ctypes, 'c_bool'):
        class c_bool_compat(ctypes.c_uint8):
            def __init__(self, value=None):
                if value:
                    ctypes.c_uint8.__init__(self, 1)
                else:
                    ctypes.c_uint8.__init__(self, 0)

            @staticmethod
            def from_param(param):
                if param:
                    return ctypes.c_uint8(1)
                else:
                    return ctypes.c_uint8(0)

        ctypes.c_bool = c_bool_compat

    from ctypes import POINTER

    # argument types aliased to their names for sanity
    # alphabetical order
    address = ctypes.c_char_p
    buf = ctypes.c_void_p
    data = ctypes.c_void_p
    client = ctypes.c_void_p
    enumerationState = ctypes.c_void_p
    enum_key = ctypes.c_void_p
    key = ctypes.c_char_p
    keyLength = ctypes.c_uint16
    keyLen = ctypes.c_uint32
    len = ctypes.c_uint32
    dataLength = ctypes.c_uint32
    keysOnly = ctypes.c_uint32
    name = ctypes.c_char_p
    nanoseconds = ctypes.c_uint64
    rejectRules = POINTER(RejectRules)
    serviceLocator = ctypes.c_char_p
    status = ctypes.c_int
    table = ctypes.c_uint64
    version = ctypes.c_uint64
    serverId = ctypes.c_uint64

    so.rc_connect.argtypes = [address, address, POINTER(client)]
    so.rc_connect.restype = status

    so.rc_disconnect.argtypes = [client]
    so.rc_disconnect.restype = None

    so.rc_createTable.argtypes = [client, name]
    so.rc_createTable.restype = status

    so.rc_dropTable.argtypes = [client, name]
    so.rc_dropTable.restype = status

    so.rc_getStatus.argtypes = []
    so.rc_getStatus.restype = status

    so.rc_getTableId.argtypes = [client, name, POINTER(table)]
    so.rc_getTableId.restype = status

    so.rc_enumerateTablePrepare.argtypes = [client, table, keysOnly,
                                            POINTER(enumerationState)]
    so.rc_enumerateTablePrepare.restype = None

    so.rc_enumerateTableNext.argtypes = [client, enumerationState,
                                         POINTER(keyLen), POINTER(enum_key),
                                         POINTER(dataLength), POINTER(data)]
    so.rc_enumerateTableNextrestype = status

    so.rc_enumerateTableFinalize.argtypes = [enumerationState]
    so.rc_enumerateTableFinalize.restype = None

    so.rc_read.argtypes = [client, table, key, keyLength, rejectRules,
                           POINTER(version), buf, len, POINTER(len)]
    so.rc_read.restype = status

    so.rc_remove.argtypes = [client, table, key, keyLength, rejectRules,
                             POINTER(version)]
    so.rc_remove.restype = status

    so.rc_write.argtypes = [client, table, key, keyLength, buf, len,
                            rejectRules, POINTER(version)]
    so.rc_write.restype = status

    so.rc_testing_kill.argtypes = [client, table, key, keyLength]
    so.rc_testing_kill.restype = status

    so.rc_testing_fill.argtypes = [client, table, key, keyLength,
                                   ctypes.c_uint32, ctypes.c_uint32]
    so.rc_testing_fill.restype = status

    so.rc_testing_get_server_id.argtypes = [client, table, key, keyLength,
                                            POINTER(serverId)]
    so.rc_testing_get_server_id.restype = status

    so.rc_testing_get_service_locator.argtypes = [client, table, key,
                                                  keyLength, serviceLocator,
                                                  ctypes.c_size_t]
    so.rc_testing_get_service_locator.restype = status

    so.rc_set_runtime_option.argtypes = [client,
                                         ctypes.c_char_p,
                                         ctypes.c_char_p]
    so.rc_set_runtime_option.restype = status

    so.rc_testing_wait_for_all_tablets_normal.argtypes = [client, nanoseconds]
    so.rc_testing_wait_for_all_tablets_normal.restype = None

    so.rc_set_log_file.argtypes = [ctypes.c_char_p]
    so.rc_set_log_file.restype = None

    return so
dataset/ETHPy150Open openstack/dragonflow/dragonflow/db/drivers/ramcloud.py/load_so/swapped operands of `in`