def _resolve_component_status(
        disable: Union[str, Iterable[str]],
        enable: Union[str, Iterable[str]],
        pipe_names: Iterable[str],
    ) -> Tuple[str, ...]:
        """Derives whether (1) `disable` and `enable` values are consistent and (2)
        resolves those to a single set of disabled components. Raises an error in
        case of inconsistency.

        disable (Union[str, Iterable[str]]): Name(s) of component(s) or serialization fields to disable.
        enable (Union[str, Iterable[str]]): Name(s) of pipeline component(s) to enable.
        pipe_names (Iterable[str]): Names of all pipeline components.

        RETURNS (Tuple[str, ...]): Names of components to exclude from pipeline w.r.t.
                                   specified includes and excludes.
        """

        if isinstance(disable, str):
            disable = [disable]
        to_disable = disable

        if enable:
            if isinstance(enable, str):
                enable = [enable]
            to_disable = {
                *[pipe_name for pipe_name in pipe_names if pipe_name not in enable],
                *disable,
            }
            # If any pipe to be enabled is in to_disable, the specification is inconsistent.
            if len(set(enable) & to_disable):
                raise ValueError(Errors.E1042.format(enable=enable, disable=disable))

        return tuple(to_disable)
Derives whether (1) `disable` and `enable` values are consistent and (2)
        resolves those to a single set of disabled components. Raises an error in
        case of inconsistency.

        disable (Union[str, Iterable[str]]): Name(s) of component(s) or serialization fields to disable.
        enable (Union[str, Iterable[str]]): Name(s) of pipeline component(s) to enable.
        pipe_names (Iterable[str]): Names of all pipeline components.

        RETURNS (Tuple[str, ...]): Names of components to exclude from pipeline w.r.t.
                                   specified includes and excludes.
        
spacy/language.py