def resolve_from_path(path):
    """Resolve a module or object from a path of the form x.y.z."""
    modname, field = path.rsplit(".", 1)
    mod = __import__(modname, fromlist=[field])
    return getattr(mod, field)