Add `from __future__ import print_function` at the top of the file and use print as a function for py3 compat