def import_name(modulename, name=None):
if name is None:<EOL><INDENT>modulename, name = modulename.rsplit('<STR_LIT::>', <NUM_LIT:1>)<EOL><DEDENT>module = __import__(modulename, globals(), {}, [name])<EOL>return getattr(module, name)<EOL>
Import identifier ``name`` from module ``modulename``.

        If ``name`` is omitted, ``modulename`` must contain the name after the
        module path, delimited by a colon.

        Parameters:
            modulename (str): Fully qualified module name, e.g. ``x.y.z``.
            name (str): Name to import from ``modulename``.

        Returns:
            object: Requested object.