Pergunta de entrevista da empresa Braintrust

write a piece of Python code for a given question