<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def value_text(self):
 """ Sets or returns the option selected in a ButtonGroup by its text value. """

        search = self._selected.get() # a string containing the selected option
        # This is a bit nasty - suggestions welcome
        for item in self._rbuttons:
            if item.value == search:
                return item.text
        return ""