alright, lifted this code from the unit tests for the plugin. If this doesn't work I'm out of ideas.
imports.