<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def failed_hosts(self):
 """Hosts that failed during the execution of the task."""

        return {h: r for h, r in self.items() if r.failed}