Move import from within a function to the top.