How to check if the websocket is still connected using the python-connector

As it says in the documentation, Binance does not guarantee that a websocket will stay connected for more than 24 hours.

I wanted to consult you to see how it could be a good option to check if it is connected or not and in that case, if necessary, reconnect the websocket.

I use the python-connector

To check connection healthy, please try to send a ping frame and expect pong from server.
The ping pong messages are designed to verify the connection.

Do you know if the python-connector automatically reconnects the websocket when it detects that the connection is close?