def import_plugin(self, modname):
        # most often modname refers to builtin modules, e.g. "pytester",
        # "terminal" or "capture".  Those plugins are registered under their
        # basename for historic purposes but must be imported with the
        # _pytest prefix.
        assert isinstance(modname, str)
        if self.get_plugin(modname) is not None:
            return
        if modname in builtin_plugins:
            importspec = "_pytest." + modname
        else:
            importspec = modname
        try:
            __import__(importspec)
        except __HOLE__ as e:
            new_exc = ImportError('Error importing plugin "%s": %s' % (modname, e))
            # copy over name and path attributes
            for attr in ('name', 'path'):
                if hasattr(e, attr):
                    setattr(new_exc, attr, getattr(e, attr))
            raise new_exc
        except Exception as e:
            import pytest
            if not hasattr(pytest, 'skip') or not isinstance(e, pytest.skip.Exception):
                raise
            self._warn("skipped plugin %r: %s" %((modname, e.msg)))
        else:
            mod = sys.modules[importspec]
            self.register(mod, modname)
            self.consider_module(mod)
dataset/ETHPy150Open pytest-dev/pytest/_pytest/config.py/PytestPluginManager.import_plugin