from typing import Tuple
from typing import Optional
import types
from typing import List
import importlib


def load_module_with_name(name: str) -> Tuple[Optional[types.ModuleType], List[str]]:
    """
    Load the module given its name.

    Example identifier: some.module
    """
    try:
        mod = importlib.import_module(name=name)
        assert isinstance(mod, types.ModuleType)
        return mod, []
    except Exception as error:
        return None, ["Failed to import the module {}: {}".format(name, error)]