import importlib


def _authentication_thunker(module, func, *args, **kw):
    """Load in authentication handler module just-in-time and dispatch the call."""
    m = importlib.import_module(module)
    return getattr(m, func)(*args, **kw)