Side question: how do you prevent import statements from being imported by "from lib import star"? (Without explicitly mentioning all the stuff that is not import statements).
For example, this is mymod.py:
import numpy as np
def f(x): return 2*x
And here it is imported: from mymod import *
f(10) # Works as expected.
np.sum([10, 20]) # Works, but shouldn't work.