So what I am looking for is something like below, a bit of code that checks if the required modules are already imported in the main.py and if not import it:
main.py