So if I understand what you're suggesting, it's to replace

```python
if oauth2_provider is None:
```

with a `try` block to avoid importing `oauth2_provider` in the head of the file ?