from importlib import import_module


def check_module_installed(name):
    """Check whether a module is available for import.

    Args:
        name (str): module name

    Returns:
        bool: Whether the module can be imported

    """

    try:
        import_module(name)
    except ImportError:
        return False
    else:
        return True