vmware wait_for snapshot

Hi there,

I would like take VM snapshot before patching os.

How do I detect snapshot creation has been completed before initiating VM patching?

Thanks