Websocket: After subscribing to symbol , control is not getting returned to main program.

Is it possible to share a working code of websocket where subscribe and subscribes are getting called multiple times

This issue is for python library