Motorola Solutions interview question

How would you test this function in python?