<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fail_all(self, err):
 """Fail all the expected replies with a given error. """

        for c_id in self._futures:
            self._fail_reply(c_id, err)