def is_retryable(err):
    """
    Determines if the given exception is something that is
    network/socket-related and should thus cause the PBC connection to
    close and the operation retried on another node.

    :rtype: boolean
    """
    if isinstance(err, socket.error):
        code = err.args[0]
        return CONN_CLOSED_ERRORS in code
    else:
        return False
dataset/ETHPy150Open basho/riak-python-client/riak/transports/tcp/__init__.py/is_retryable/swapped operands of `in`