This should be a separate function. Then do `parent_folders = _PathsToAllParentFolders(filename)`