def restore(self):
current, self.nlp.pipeline = self.nlp.pipeline, self.original_pipeline<EOL>unexpected = [name for name, pipe in current if not self.nlp.has_pipe(name)]<EOL>if unexpected:<EOL><INDENT>self.nlp.pipeline = current<EOL>raise ValueError(Errors.E008.format(names=unexpected))<EOL><DEDENT>self[:] = []<EOL>
Restore the pipeline to its state when DisabledPipes was created.