[pythoninvoker] Block until python execution has completed before deleting object