code: def toggle_input(self):
          
          current_index = self.input.currentIndex()
          # If current input is not a radio button enabler, disable radio button.
          if self.input.itemData(current_index, Qt.UserRole) != (
                  self.radio_button_enabler):
              self.disable_radio_button()
          # Otherwise, enable radio button.
          else:
              self.enable_radio_button()
docs: Change behaviour of radio button based on input.