sync manager in python