You can use `DictModuleAutoDiscoverySubRegistry` with `keygetter = lambda key, module: module.__name__.split('.')[-1]` and `valuegetter = lambda key, module: (module.pattern, module.rules)`

-- 

PS: Please check my code before ;)