def my_function(): print("Function executed from script2") print("Top-level code executed in script2.") # 这行代码在导入时会被执行