def create_connection(url, timeout=None, **options):
    sockopt = options.get("sockopt", [])
    sslopt = options.get("sslopt", {})
    websock = WebSocket(sockopt=sockopt, sslopt=sslopt)
    websock.settimeout(timeout if timeout is not None else default_timeout)
    websock.connect(url, **options)
    return websock
connect to url and return websocket object.
dataset/ETHPy150Open tomwilkie/awesomation/third_party/py/websocket-client/websocket.py/create_connection