def METHOD_NAME(self, parent: QWidget, option: QStyleOptionViewItem, index: QModelIndex):
    model = index.model()
    row = index.row()
    lbl = model.message_type[row]
    if lbl.value_type_index == 2:
        line_edit = ExpressionLineEdit(parent)
        line_edit.setPlaceholderText("(item1.length + 3) ^ 0x12")
        line_edit.setCompleter(QCompleter(self.controller.completer_model, line_edit))
        line_edit.setValidator(RuleExpressionValidator(self.controller.sim_expression_parser))
        line_edit.setToolTip(self.controller.sim_expression_parser.formula_help)
        return line_edit
    elif lbl.value_type_index == 3:
        return ExternalProgramWidget(parent)
    elif lbl.value_type_index == 4:
        random_widget = RandomValueWidget(parent)
        random_widget.spinbox_random_min.setMaximum(lbl.fuzz_maximum - 2)
        random_widget.spinbox_random_max.setMinimum(1)
        random_widget.spinbox_random_max.setMaximum(lbl.fuzz_maximum - 1)
        return random_widget
    else:
        return super().METHOD_NAME(parent, option, index)