##### 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
"""Sanity test which executes mypy."""
from __future__ import annotations
import dataclasses
import os
import re
import typing as t
from . import (
    SanityMultipleVersion,
    SanityMessage,
    SanityFailure,
    SanitySuccess,
    SanitySkipped,
    SanityTargets,
    create_sanity_virtualenv,
)
from ...constants import (
    CONTROLLER_PYTHON_VERSIONS,
    REMOTE_ONLY_PYTHON_VERSIONS,
)
from ...test import (
    TestResult,
)
from ...target import (
    TestTarget,
)
from ...util import (
    SubprocessError,
    display,
    parse_to_list_of_dict,