Just skimming through the above, if it's not already included, being able to restrict the node creation/line splitting to just those intersections of lines which share common attributes (along the same lines as by=[] in merge_edges) would be handy too.
i.e. for a road network, you wouldn't want nodes created where a tunnel happens to pass under local (ground level) roads. Likely the same for any other hierarchal network which could be at different 'levels' and/or elevations above/below ground?
From comment on #15