The way we validate required positional arguments in our decorators is hard to understand. This attempts to make the flow a bit easier to follow (and easier to change).
some ideas inline - I think this can use a second pass. Its a little better but not a clear step up imo
its odd how many of these call sites don't use the output on this function
also agree the lambda for error message is an unfortunate indirection. Would make it hard to improve the error message with more granular context
what if we had a couple more granular functions instead?
split part probably doesnt need a func