Don't name your script
Rename
imap_tools.py
it will shadow(circular import) of the real imap_tools.Rename
imap_tools.py
to eg my_tools.py
.