code: func addOrUpdateTaint(node *v1.Node, taint *v1.Taint) (*v1.Node, bool, error) {
  	newNode := node.DeepCopy()
  	nodeTaints := newNode.Spec.Taints
  
  	var newTaints []v1.Taint
  	updated := false
  	for i := range nodeTaints {
  		if taint.MatchTaint(&nodeTaints[i]) {
  			if equality.Semantic.DeepEqual(*taint, nodeTaints[i]) {
  				return newNode, false, nil
  			}
  			newTaints = append(newTaints, *taint)
  			updated = true
  			continue
  		}
  
  		newTaints = append(newTaints, nodeTaints[i])
  	}
  
  	if !updated {
  		newTaints = append(newTaints, *taint)
  	}
  
  	newNode.Spec.Taints = newTaints
  	return newNode, true, nil
  }
docs: // addOrUpdateTaint tries to add a taint to annotations list. Returns a new copy of updated Node and true if something was updated
  // false otherwise.