def _import_parent_use_constant_from_deprecated_module_attribute():
    """to ensure that module initializations set attributes correctly"""
    # sets up the DeprecationFinders
    import cirq.testing._compat_test_data

    # the parent should have fake_a set on it as an attribute - just like
    # a regular module import (e.g. cirq.ops)
    # should have a DUPE_CONSTANT as its imported from the dupe submodule
    assert cirq.testing._compat_test_data.fake_a.DUPE_CONSTANT is False

    assert 'module_a for module deprecation tests' in cirq.testing._compat_test_data.fake_a.__doc__
    assert 'Test module for deprecation testing' in cirq.testing._compat_test_data.__doc__
to ensure that module initializations set attributes correctly
cirq-core/cirq/_compat_test.py