# Realizar revisão de código, encontrar todos os erros
def get_first_matching_object(predicate, objects=[]):
matching_objects = (obj for obj in objects if predicate(obj))
if matching_objects:
object = matching_objects[0]
return object
else:
return None