def METHOD_NAME(self, gradient: dict):
    """Set the currently selected gradient
    If the gradient is not available, a 'Custom' item is added for it.
    """
    for name, description in pyqtgraph.graphicsItems.GradientEditorItem.Gradients.items():
        if gradient['mode'] == description['mode'] and gradient['ticks'] == description['ticks']:
            self._gradientComboBox.setCurrentText(name.capitalize())
            return
    icon = self._createQIconFromGradient(gradient)
    # Block signals to avoid emitting with previously selected gradient since index changes
    wasBlocked = self._gradientComboBox.blockSignals(True)
    self._gradientComboBox.insertItem(0, icon, 'Custom', gradient)
    self._gradientComboBox.blockSignals(wasBlocked)
    self._gradientComboBox.setCurrentIndex(0)