The _resolve_name and _import_module were taken from the backport of importlib.import_module from 3.x to 2.7. Thanks to the Python developers for making this available as a standalone module. This makes it possible to have an import module that mimics the “import” statement more closely.