This sounds like a perfect opportunity to prove a third party module could be useful. I'm not sure how to configure tab completion callbacks in every environment like ipython, Jupyter, Python shell, PyCharm, VS Code, vim, or whatever.
But without getting to that step (which is definitely possible with the right incantations for each), you could definitely create this and publish it on PyPI:
>>> from howto import q
email can be sent with the `smtp` module
email messages can be created and manipulated with the `email` module
email can be retrieved with the `pop3` and `smtp` modules
The actual dictionary or search tool that finds relevant messages is 100x more work than wiring in the tab-completion hook to some particular environment.