If nothing selected, does the same as sp_nodepath_select_all(); otherwise selects/inverts all nodes in all subpaths that have selected nodes (i.e., similar to "select all in layer", with the "selected" subpaths being treated as "layers" in the path).