I used your function but still get an endless stream of:
print("the run is still in process, please wait a second.")