def transient_internet():
time_out = TransientResource(IOError, errno=errno.ETIMEDOUT)<EOL>socket_peer_reset = TransientResource(socket.error, errno=errno.ECONNRESET)<EOL>ioerror_peer_reset = TransientResource(IOError, errno=errno.ECONNRESET)<EOL>return contextlib.nested(time_out, socket_peer_reset, ioerror_peer_reset)<EOL>
Return a context manager that raises ResourceDenied when various issues
    with the Internet connection manifest themselves as exceptions.