code: def extra_keywords_to_widgets(extra_keyword_definition):
      
      # Check box
      check_box = QCheckBox(extra_keyword_definition['name'])
      check_box.setToolTip(extra_keyword_definition['description'])
      check_box.setChecked(True)
  
      # Input widget
      if extra_keyword_definition['type'] == float:
          input_widget = QDoubleSpinBox()
          input_widget.setMinimum(extra_keyword_definition['minimum'])
          input_widget.setMaximum(extra_keyword_definition['maximum'])
          input_widget.setSuffix(extra_keyword_definition['unit_string'])
      elif extra_keyword_definition['type'] == int:
          input_widget = QSpinBox()
          input_widget.setMinimum(extra_keyword_definition['minimum'])
          input_widget.setMaximum(extra_keyword_definition['maximum'])
          input_widget.setSuffix(extra_keyword_definition['unit_string'])
      elif extra_keyword_definition['type'] == str:
          if extra_keyword_definition.get('options'):
              input_widget = QComboBox()
              options = extra_keyword_definition['options']
              for option in options:
                  input_widget.addItem(
                      option['name'],
                      option['key'],
                  )
              default_option_index = input_widget.findData(
                  extra_keyword_definition['default_option'])
              input_widget.setCurrentIndex(default_option_index)
          else:
              input_widget = QLineEdit()
      elif extra_keyword_definition['type'] == datetime:
          input_widget = QDateTimeEdit()
          input_widget.setCalendarPopup(True)
          input_widget.setDisplayFormat('hh:mm:ss, d MMM yyyy')
          input_widget.setDateTime(datetime.now())
      else:
          raise Exception
      input_widget.setToolTip(extra_keyword_definition['description'])
  
      # Signal
      # noinspection PyUnresolvedReferences
      check_box.stateChanged.connect(input_widget.setEnabled)
  
      return check_box, input_widget
docs: Create widgets for extra keyword.
  
      :param extra_keyword_definition: An extra keyword definition.
      :type extra_keyword_definition: dict
  
      :return: QCheckBox and The input widget
      :rtype: (QCheckBox, QWidget)