def load(target, **namespace):
module, target = target.split("<STR_LIT::>", <NUM_LIT:1>) if '<STR_LIT::>' in target else (target, None)<EOL>if module not in sys.modules: __import__(module)<EOL>if not target: return sys.modules[module]<EOL>if target.isalnum(): return getattr(sys.modules[module], target)<EOL>package_name = module.split('<STR_LIT:.>')[<NUM_LIT:0>]<EOL>namespace[package_name] = sys.modules[package_name]<EOL>return eval('<STR_LIT>' % (module, target), namespace)<EOL>
Import a module or fetch an object from a module.

        * ``package.module`` returns `module` as a module object.
        * ``pack.mod:name`` returns the module variable `name` from `pack.mod`.
        * ``pack.mod:func()`` calls `pack.mod.func()` and returns the result.

        The last form accepts not only function calls, but any type of
        expression. Keyword arguments passed to this function are available as
        local variables. Example: ``import_string('re:compile(x)', x='[a-z]')``