def METHOD_NAME(store, ref, data, target):
    filepath = data["file"].lstrip("/")
    # prepare the mount point
    filename = pathlib.Path(target, filepath)
    os.makedirs(filename.parent, exist_ok=True)
    filename.touch()
    store.read_tree_at(ref, filename, filepath)
    return filepath, data.get("metadata", {})