def load_config(
        self, options: dict[str, Any], config_file_path: str | None = None
    ) -> tuple[ConfigErrors, ConfigWarnings]:
        """Load config from a dict of options. Returns a tuple of (errors, warnings)."""
        if self.config_class is LegacyConfig:
            self.config = LegacyConfig(self.config_scheme, config_file_path=config_file_path)  # type: ignore
        else:
            self.config = self.config_class(config_file_path=config_file_path)

        self.config.load_dict(options)

        return self.config.validate()
Load config from a dict of options. Returns a tuple of (errors, warnings).
mkdocs/plugins.py