docs: async def open_websocket(url: str,
                           headers: Optional[list] = None,
                           subprotocols: Optional[list] = None):
      """
      Opens a websocket.
      """
      ws = await create_websocket(
          url, headers=headers, subprotocols=subprotocols)
      try:
          yield ws
      finally:
          await ws.close()