title: Python - how can I override the functionality of a class before it's imported by a different module?
body: <p>I have a class that's being imported in <code>module_x</code> for instantiation, but first I want to override one of the class's methods to include a specific feature dynamically (inside some middleware that runs before <code>module_x</code> is loaded.</p>