##### 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
"""Load the requested module while avoiding infinite recursion.
            :type fullname: str
            :rtype: module
            """
            self.loaded_modules.add(fullname)
            return import_module(fullname)
    def run(restrict_to_module_paths):
        """Main program function."""
        base_dir = os.getcwd()
        messages = set()
        for path in sys.argv[1:] or sys.stdin.read().splitlines():
            name = convert_relative_path_to_name(path)
            test_python_module(path, name, base_dir, messages, restrict_to_module_paths)
        if messages:
            sys.exit(10)
    def test_python_module(path, name, base_dir, messages, restrict_to_module_paths):
        """Test the given python module by importing it.
        :type path: str
        :type name: str
        :type base_dir: str
        :type messages: set[str]
        :type restrict_to_module_paths: bool
        """
        if name in sys.modules:
            return  
        is_ansible_module = (path.startswith('lib/ansible/modules/') or path.startswith('plugins/modules/')) and os.path.basename(path) != '__init__.py'
        run_main = is_ansible_module
        if path == 'lib/ansible/modules/async_wrapper.py':