Don't import from inside functions

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>