If it is imported by another module then it won't run automatically. We have to call it manually.

examples/functions/import_mymodule.py
from __future__ import print_function
import mymodule

print("Name space in import_mymodule.py ", __name__)
mymodule.run()

$ python import_mymodule.py
Name space in mymodule.py  mymodule
Name space in import_mymodule.py  __main__
run in  mymodule