Motorola Solutions Interview Question

How would you test this function in python?