import importlib


def is_library_installed(library_name):
    """
    Tests if a library is installed.
    """
    try:
        importlib.import_module(library_name)
        return True
    except ModuleNotFoundError:
        return False