REFACTOR: Support importing of `Pretender` (PR #10826)

We shouldn’t be using global variables for libraries.

GitHub