when fun() is run it should insert the script of external.py in main_script.py and run like a single file.
def fun():