def _find_spec_deprecated_multiple_times():
    """to ensure the idempotency of the aliasing loader change"""
    # sets up the DeprecationFinders
    import importlib.util

    # first import, the loader is the regular loader on the spec
    assert importlib.util.find_spec('cirq.testing._compat_test_data.fake_a')
    # second import it might be the aliasing loader already
    assert importlib.util.find_spec('cirq.testing._compat_test_data.fake_a')
to ensure the idempotency of the aliasing loader change
cirq-core/cirq/_compat_test.py