i guess it is often the case that these functions are called `with_confidence` set to false, right? (because if it's not often, one could always return the pair, and simplify the code, since in python is very easy to access the first element of the pair...)