from importlib import import_module


def try_import(module):
    """Try to import and return module, or return
    None if the module does not exist."""
    try:
        return import_module(module)
    except ImportError:
        pass