This should be at the top, see http://mozweb.readthedocs.org/en/latest/coding.html#import-statements