import importlib


def timport(name):
    """
    Try to import and return the module named `name`, and return `None` on
    failure.
    """

    try:
        return importlib.import_module(name)
    except ImportError:
        return None