1921: Move imports to the top of the function