I think it's part of the contract of this function that the arguments are not `None`.  If not, then this should raise a `TypeError`, which is pretty idiomatic in Python.

Is there a risk that the caller will pass in `None` for any of the arguments?