how to reconnect binance websocket using python

Hi mates,

Here is my question, I am following the instruction binance-toolbox-python/manage_local_order_book.py at master · binance/binance-toolbox-python · GitHub to stream the L2 data, but sometimes it loses connection. Does anyone know how to automatically reconnect in the case the connection is lost?

kind regards
pyq