def replace_pipe(self, name, component):
if name not in self.pipe_names:<EOL><INDENT>raise ValueError(Errors.E001.format(name=name, opts=self.pipe_names))<EOL><DEDENT>self.pipeline[self.pipe_names.index(name)] = (name, component)<EOL>
Replace a component in the pipeline.

        name (unicode): Name of the component to replace.
        component (callable): Pipeline component.

        DOCS: https://spacy.io/api/language#replace_pipe