(subexpr)
| 6223 | res = set() |
| 6224 | |
| 6225 | def rec(subexpr): |
| 6226 | if subexpr.__class__ is tuple: |
| 6227 | # AND, OR, NOT, or relation |
| 6228 | |
| 6229 | rec(subexpr[1]) |
| 6230 | |
| 6231 | # NOTs only have a single operand |
| 6232 | if subexpr[0] is not NOT: |
| 6233 | rec(subexpr[2]) |
| 6234 | |
| 6235 | else: |
| 6236 | # Symbol or choice |
| 6237 | res.add(subexpr) |
| 6238 | |
| 6239 | rec(expr) |
| 6240 | return res |
no test coverage detected