Since this might not be the only time I have to do this, decided to put the code somewhere (and the methods to infer the slot ranges were quite nice here already! :) ).
I know there are some small formatting changes here: it's just me going through the file to understand the code and editing as I go to understand it better (I could go further and pull out some of the shared code into methods if we want me to).
I had a use case to generate a bunch of slots in an existing schema from a TSV.
Since this might not be the only time I have to do this, decided to put the code somewhere (and the methods to infer the slot ranges were quite nice here already! :) ).
I know there are some small formatting changes here: it's just me going through the file to understand the code and editing as I go to understand it better (I could go further and pull out some of the shared code into methods if we want me to).