@contextlib.contextmanager
def set_keepidle(value):
    TCP_KEEPIDLE = getattr(socket, 'TCP_KEEPIDLE', None)
    socket.TCP_KEEPIDLE = value

    yield

    if TCP_KEEPIDLE is not None:
        socket.TCP_KEEPIDLE = TCP_KEEPIDLE
    else:
        del socket.TCP_KEEPIDLE
Return the last non whitespace token.
dataset/ETHPy150Open sigmavirus24/requests-toolbelt/tests/test_socket_options_adapter.py/set_keepidle--crossover with--dataset/ETHPy150Open google/closure-linter/closure_linter/statetracker.py/StateTracker.GetLastNonSpaceToken