def import_all_submodules(name):
    for app_config in apps.get_app_configs():
        app_module = app_config.module

        try:
            importlib.import_module('%s.%s' % (app_module.__name__, name))
        except __HOLE__:
            if module_has_submodule(app_module, name):
                raise
dataset/ETHPy150Open thread/django-lightweight-queue/django_lightweight_queue/utils.py/import_all_submodules