code: func (s *Store) AutopilotCASConfig(idx, cidx uint64, config *autopilot.Config) (bool, error) {
  	tx := s.db.Txn(true)
  	defer tx.Abort()
  
  	// Check for an existing config
  	existing, err := tx.First("autopilot-config", "id")
  	if err != nil {
  		return false, fmt.Errorf("failed autopilot config lookup: %s", err)
  	}
  
  	// If the existing index does not match the provided CAS
  	// index arg, then we shouldn't update anything and can safely
  	// return early here.
  	e, ok := existing.(*autopilot.Config)
  	if !ok || e.ModifyIndex != cidx {
  		return false, nil
  	}
  
  	if err := s.autopilotSetConfigTxn(idx, tx, config); err != nil {
  		return false, err
  	}
  
  	tx.Commit()
  	return true, nil
  }
docs: // AutopilotCASConfig is used to try updating the Autopilot configuration with a
  // given Raft index. If the CAS index specified is not equal to the last observed index
  // for the config, then the call is a noop,