def load_from_config(
        self,
        modules: Iterable[str],
        config: TPluginConfig,
    ) -> None:
        """Load plugin modules, and read their settings from configuration."""

        for module in modules:
            self.current_module = module
            __import__(module)
            mod = sys.modules[module]

            coverage_init = getattr(mod, "coverage_init", None)
            if not coverage_init:
                raise PluginError(
                    f"Plugin module {module!r} didn't define a coverage_init function",
                )

            options = config.get_plugin_options(module)
            coverage_init(self, options)

        self.current_module = None
Load plugin modules, and read their settings from configuration.
coverage/plugin_support.py