and i think it would be cleaner written as something like
```python
latest_billable_by_message_id = {}
for billable in all_billables:
    if billable.log_id not in latest_billable_by_message_id or latest_billable_by_message_id[billable.message_id].date < billable.date:
      latest_billable_by_message_id[billable.log_id] = billable