code: func (kubemarkController *KubemarkController) SetNodeGroupSize(nodeGroup string, size int) error {
  	currSize, err := kubemarkController.GetNodeGroupTargetSize(nodeGroup)
  	if err != nil {
  		return err
  	}
  	switch delta := size - currSize; {
  	case delta < 0:
  		absDelta := -delta
  		nodes, err := kubemarkController.GetNodeNamesForNodeGroup(nodeGroup)
  		if err != nil {
  			return err
  		}
  		if len(nodes) < absDelta {
  			return fmt.Errorf("can't remove %d nodes from %s nodegroup, not enough nodes: %d", absDelta, nodeGroup, len(nodes))
  		}
  		for i, node := range nodes {
  			if i == absDelta {
  				return nil
  			}
  			if err := kubemarkController.RemoveNodeFromNodeGroup(nodeGroup, node); err != nil {
  				return err
  			}
  		}
  	case delta > 0:
  		kubemarkController.nodeGroupQueueSizeLock.Lock()
  		for i := 0; i < delta; i++ {
  			kubemarkController.nodeGroupQueueSize[nodeGroup]++
  			kubemarkController.createNodeQueue <- nodeGroup
  		}
  		kubemarkController.nodeGroupQueueSizeLock.Unlock()
  	}
  
  	return nil
  }
docs: // SetNodeGroupSize changes the size of node group by adding or removing nodes.