def resolve(root, path):
    """Given a path resolve to an object.

        root - root object in the hierarchy
        path - a path as created with path()

        Returns the object that the path referred to.

        If the path cannot be resolved to an object, raise a ValueError.
        """
