import importlib


def module_exists(module_name: str) -> bool:
    """
    Check whether a Python module already exists with this name - for
    example, a builtin module.
    """
    try:
        importlib.import_module(module_name)
    except ModuleNotFoundError:
        return False
    else:
        return True