def import_dynamic(modname):
 if (sys.version_info >= (3, 3)):
  import importlib
  importlib.invalidate_caches()
 __import__(modname)
 return sys.modules[modname]

def import_dynamic ( modname ) : if ( sys . version_info >= ( 3 , 3 ) ) : import importlib importlib . invalidate_caches ( ) __import__ ( modname ) return sys . modules [ modname ]
import and return a module of the given name .