code: def restore_snapshot(self, snapshot):
          
          if not isinstance(snapshot, ISnapshot):
              raise TypeError("snapshot can only be an instance of type ISnapshot")
          progress = self._call("restoreSnapshot",
                       in_p=[snapshot])
          progress = IProgress(progress)
          return progress
docs: Starts resetting the machine's current state to the state contained
          in the given snapshot, asynchronously. All current settings of the
          machine will be reset and changes stored in differencing media
          will be lost.
          See :py:class:`ISnapshot`  for an introduction to snapshots.
          
          After this operation is successfully completed, new empty differencing
          media are created for all normal media of the machine.
          
          If the given snapshot is an online snapshot, the machine will go to
          the :py:attr:`MachineState.saved` saved state, so that the
          next time it is powered on, the execution state will be restored
          from the state of the snapshot.
          
          
          The machine must not be running, otherwise the operation will fail.
          
          
          
          If the machine state is :py:attr:`MachineState.saved` Saved
          prior to this operation, the saved state file will be implicitly
          deleted (as if :py:func:`IMachine.discard_saved_state`  were
          called).
  
          in snapshot of type :class:`ISnapshot`
              The snapshot to restore the VM state from.
  
          return progress of type :class:`IProgress`
              Progress object to track the operation completion.
  
          raises :class:`VBoxErrorInvalidVmState`
              Virtual machine is running.