Importing a module with a local name is easy with the import statement:
import numpy as np
I believe np here is referred to as the "local name" but I could be confused.
I can't work out how to use the importlib module to do the same thing. importlib.import_module() doesn't take an option for the local name as far as I can tell. Any suggestions?