From @nicolaslupien's comment, we should suffix this function with an exclamation mark, since it raises. To keep things super tight, I've also went ahead with his suggestion to split the function. Unit tests already exist to check if to_unit_name and convert raise.
From @nicolaslupien's comment, we should suffix this function with an exclamation mark, since it raises. To keep things super tight, I've also went ahead with his suggestion to split the function. Unit tests already exist to check if
to_unit_name
andconvert
raise.