#NEWLINE# def get_socket( host , port , timeout = None ) : #NEWLINE# #INDENT# '\n    Return a socket connection.\n\n    :param host: the hostname to connect to\n    :param port: the port number to connect to\n    :param timeout: if specified, set the socket timeout\n    ' #NEWLINE# return socket . create_connection ( ( timeout , port ) , timeout )