```python
cbs = CheckboxSelect("root_xpath", lambda element: element.get_parent().xpath("whatever").text)
```
Then it goes around all checkboxes and applies the function on each of it, comparing its output with searched value. I should rewrite that sentence.