Instead of requiring this, you could make this:

```py
module_path = valid_modules.get(name) or name
```