def create_pipe_from_source(
        self, source_name: str, source: "Language", *, name: str
    ) -> Tuple[PipeCallable, str]:
        """Create a pipeline component by copying it from an existing model.

        source_name (str): Name of the component in the source pipeline.
        source (Language): The source nlp object to copy from.
        name (str): Optional alternative name to use in current pipeline.
        RETURNS (Tuple[Callable[[Doc], Doc], str]): The component and its factory name.
        """
        # Check source type
        if not isinstance(source, Language):
            raise ValueError(Errors.E945.format(name=source_name, source=type(source)))
        if self.vocab.vectors != source.vocab.vectors:
            warnings.warn(Warnings.W113.format(name=source_name))
        if source_name not in source.component_names:
            raise KeyError(
                Errors.E944.format(
                    name=source_name,
                    model=f"{source.meta['lang']}_{source.meta['name']}",
                    opts=", ".join(source.component_names),
                )
            )
        pipe = source.get_pipe(source_name)
        # There is no actual solution here. Either the component has the right
        # name for the source pipeline or the component has the right name for
        # the current pipeline. This prioritizes the current pipeline.
        if hasattr(pipe, "name"):
            pipe.name = name
        # Make sure the source config is interpolated so we don't end up with
        # orphaned variables in our final config
        source_config = source.config.interpolate()
        pipe_config = util.copy_config(source_config["components"][source_name])
        self._pipe_configs[name] = pipe_config
        if self.vocab.strings != source.vocab.strings:
            for s in source.vocab.strings:
                self.vocab.strings.add(s)
        return pipe, pipe_config["factory"]
Create a pipeline component by copying it from an existing model.

        source_name (str): Name of the component in the source pipeline.
        source (Language): The source nlp object to copy from.
        name (str): Optional alternative name to use in current pipeline.
        RETURNS (Tuple[Callable[[Doc], Doc], str]): The component and its factory name.
        
spacy/language.py