title: How can I execute a class level decorator for a class that isn't used directly?
body: <p>I have the following class:</p>
  <pre class="lang-py prettyprint-override"><code>@jsonpickle.handlers.register(Enum, base=True)
  class EnumHandler(BaseHandler):
     ... snip ...
  </code></pre>
  <p>When the decorator is executed, it registers the class with <code>jsonpickle</code> and is then used whenever it needs to serialize/deserialize an Enum.</p>
  <p>My code never class <code>EnumHandler</code> directly. Therefore, I believe the class is never initialized and the decorator is never executed.</p>
  <p>If I add an arbitrary import for <code>EnumHandler</code> in another file that is used, then everything works. However, I don't like this because <code>EnumHandler</code> isn't used by that file so the import appears to be redundant. My IDE (PyCharm) marks it as unused and another developer could easily remove it without realizing they are breaking functionality.</p>
  <p>Is there a better way to ensure this class is initialized?</p>