def tryDynMod(name):
    '''
    Dynamically import a python module or exception.
    '''
    try:
        return importlib.import_module(name)
    except ModuleNotFoundError:
        raise s_exc.NoSuchDyn(name=name)
Dynamically import a python module or exception.