Pergunta de entrevista da empresa Motorola Solutions

How would you test this function in python?