def _load_module(modulepath):
    """Load module `modulepath` and return the last module object in the
    module path."""

    mod = __import__(modulepath)
    path = []
    for token in modulepath.split(".")[1:]:
       path.append(token)
       mod = getattr(mod, token)
    return mod