code: def set_value(self, value):
          
          # Find index of choice
          try:
              value_index = self._parameter.options.index(value)
              self.input_button_group.button(value_index).setChecked(True)
          except ValueError:
              last_index = len(self._parameter.options) - 1
              self.input_button_group.button(last_index).setChecked(
                  True)
              self.custom_value.setValue(value)
  
          self.toggle_custom_value()
docs: Set value by item's string.
  
          :param value: The value.
          :type value: str, int
  
          :returns: True if success, else False.
          :rtype: bool