code: func (c *Cluster) ValidateConfigurationChange(cc raftpb.ConfChange) error {
  	c.mu.Lock()
  	defer c.mu.Unlock()
  
  	if c.removed[cc.NodeID] {
  		return ErrIDRemoved
  	}
  	switch cc.Type {
  	case raftpb.ConfChangeAddNode:
  		if c.members[cc.NodeID] != nil {
  			return ErrIDExists
  		}
  	case raftpb.ConfChangeRemoveNode:
  		if c.members[cc.NodeID] == nil {
  			return ErrIDNotFound
  		}
  	case raftpb.ConfChangeUpdateNode:
  		if c.members[cc.NodeID] == nil {
  			return ErrIDNotFound
  		}
  	default:
  		return ErrConfigChangeInvalid
  	}
  	m := &api.RaftMember{}
  	if err := proto.Unmarshal(cc.Context, m); err != nil {
  		return ErrCannotUnmarshalConfig
  	}
  	return nil
  }
docs: // ValidateConfigurationChange takes a proposed ConfChange and
  // ensures that it is valid.