Move future import to the top of the file

All `from __future__` imports have to be at the top of the file.