##### SUMMARY

Implement `find_spec` and `exec_module` in the `RestrictedModuleLoader` for Python 3.10 and later. This depends on updating the collection loader first.

See also: https://github.com/ansible/ansible/issues/72952

Depends on: https://github.com/ansible/ansible/issues/74660

##### ISSUE TYPE

Feature Idea

##### COMPONENT NAME

test/lib/ansible_test/_data/sanity/import/importer.py
"""True if the test requires PyPI, otherwise False."""
        return True
    def test(self, args, targets, python):  
        settings = self.load_processor(args, python.version)
        paths = [target.path for target in targets.include]
        virtualenv_python = create_sanity_virtualenv(args, args.controller_python, self.name)
        if args.prime_venvs:
            return SanitySkipped(self.name, python_version=python.version)
        if not virtualenv_python:
            display.warning(f'Skipping sanity test "{self.name}" due to missing virtual environment support on Python {args.controller_python.version}.')
            return SanitySkipped(self.name, python.version)
        contexts = (
            MyPyContext('ansible-test', ['test/lib/ansible_test/_internal/'], CONTROLLER_PYTHON_VERSIONS),
            MyPyContext('ansible-core', ['lib/ansible/'], CONTROLLER_PYTHON_VERSIONS),
            MyPyContext('modules', ['lib/ansible/modules/', 'lib/ansible/module_utils/'], REMOTE_ONLY_PYTHON_VERSIONS),
        )
        unfiltered_messages = []  
        for context in contexts:
            if python.version not in context.python_versions:
                continue
            unfiltered_messages.extend(self.test_context(args, virtualenv_python, python, context, paths))
        notices = []
        messages = []
        for message in unfiltered_messages:
            if message.level != 'error':
                notices.append(message)
                continue
            match = re.search(r'^(?P<message>.*) {2}\[(?P<code>.*)]$', message.message)
            messages.append(SanityMessage(