code: def rewind(self, new_state):
          
          if new_state > self._state:
              raise ValueError("cannot forward using rewind "
                               "({} > {})".format(new_state, self._state))
          self._state = new_state
docs: Rewind can be used as an exceptional way to roll back the state of a
          :class:`OrderedStateMachine`.
  
          Rewinding is not the usual use case for an
          :class:`OrderedStateMachine`. Usually, if the current state `A` is
          greater than any given state `B`, it is assumed that state `B` cannot
          be reached anymore (which makes :meth:`wait_for` raise).
  
          It may make sense to go backwards though, and in cases where the
          ability to go backwards is sensible even if routines which previously
          attempted to wait for the state you are going backwards to failed,
          using a :class:`OrderedStateMachine` is still a good idea.