code: def restore(self):
          
          current, self.nlp.pipeline = self.nlp.pipeline, self.original_pipeline
          unexpected = [name for name, pipe in current if not self.nlp.has_pipe(name)]
          if unexpected:
              # Don't change the pipeline if we're raising an error.
              self.nlp.pipeline = current
              raise ValueError(Errors.E008.format(names=unexpected))
          self[:] = []
docs: Restore the pipeline to its state when DisabledPipes was created.