code: def restore(self, state):
          
  
          selector = DataStreamSelector.FromString(state.get(u'selector'))
          if selector != self.selector:
              raise ArgumentError("Attempted to restore a BufferedStreamWalker with a different selector",
                                  selector=self.selector, serialized_data=state)
  
          self.seek(state.get(u'offset'), target="offset")
docs: Restore a previous state of this stream walker.
  
          Raises:
              ArgumentError: If the state refers to a different selector or the
                  offset is invalid.