(self, x)
| 34 | self._p[x] = x |
| 35 | |
| 36 | def find(self, x) -> tuple: |
| 37 | self._ensure(x) |
| 38 | if self._p[x] != x: |
| 39 | self._p[x] = self.find(self._p[x]) |
| 40 | return self._p[x] |
| 41 | |
| 42 | def union(self, a, b): |
| 43 | ra, rb = self.find(a), self.find(b) |
no test coverage detected