Reset internalized states in Python wrapper.