<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def import_name(mod_name):
 """Import a module by module name. @param mod_name: module name. """

    try:
        mod_obj_old = sys.modules[mod_name]
    except KeyError:
        mod_obj_old = None

    if mod_obj_old is not None:
        return mod_obj_old

    __import__(mod_name)

    mod_obj = sys.modules[mod_name]

    return mod_obj