Isn't this a rather strange way of testing the actual required condition?
I think you should at least also check whether `len(ml_usage) == idx`, no?