def module_import(module_name):
    """
    Imports the module with the given name, this import
    operation is recursive meaning that inner packages
    are also going to be imported.

    :type module_name: String
    :param module_name: The name of the module to be imported,
    this value may contain multiple "sub" packages.
    :rtype: module
    :return: The imported module as a variable reference.
    """
    module = __import__(module_name)
    components = module_name.split('.')
    for component in components[1:]:
        module = getattr(module, component)
    return module
