code: func SetNodeCondition(c clientset.Interface, node types.NodeName, condition v1.NodeCondition) error {
  	generatePatch := func(condition v1.NodeCondition) ([]byte, error) {
  		raw, err := json.Marshal(&[]v1.NodeCondition{condition})
  		if err != nil {
  			return nil, err
  		}
  		return []byte(fmt.Sprintf(`{"status":{"conditions":%s}}`, raw)), nil
  	}
  	condition.LastHeartbeatTime = metav1.NewTime(time.Now())
  	patch, err := generatePatch(condition)
  	if err != nil {
  		return nil
  	}
  	_, err = c.CoreV1().Nodes().PatchStatus(string(node), patch)
  	return err
  }
docs: // SetNodeCondition updates specific node condition with patch operation.