<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GetFailedTasks(self):
 """Retrieves all failed tasks. Failed tasks are tasks that were abandoned and have no retry task once the foreman is done processing. Returns: list[Task]: tasks. """

    # TODO: add check to determine foreman is done processing.

    with self._lock:
      return [task for task in self._tasks_abandoned.values()
              if not task.has_retry]