<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def members(self, x):
 """Yields the members of the equivalence class containing `x`."""

        if x not in self._parents:
            yield x
            return
        cur_x = x
        while True:
            yield cur_x
            cur_x = self._prev_next[cur_x][1]
            if cur_x == x:
                break