<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def iter_causes(self):
 """Iterate over all causes."""

        curr = self._cause
        while curr is not None:
            yield curr
            curr = curr._cause