def METHOD_NAME(self, key):
    self.key = key
    if key is None:
        self.recorded_key_label.setText("Key: {}".format(self.DEFAULT_RECORDED_KEY_LABEL_CONTENT))  # TODO: i18n
        self.key_assigned.emit(False)
    else:
        self.recorded_key_label.setText("Key: {}".format(key))  # TODO: i18n
        self.key_assigned.emit(True)